Hacker News new | ask | show | jobs
by jbreckmckye 492 days ago
I'm well aware that browsers don't run TS. But in this instance we are talking about the server side runtime.

Building is creating the runnable artefact, but in the context of the server this artefact is already runnable, so I'd just call that "interpreting" the program

2 comments

> But in this instance we are talking about the server side runtime.

Not at all. We are talking about SSR, and the need for a build step (on the backend). That should be pretty obvious considering the explicit mentions of running the code in the browser, jsx, ts, etc. (Not to mention the backend runtime cannot run typescript/jsx without build either)

> Building is creating the runnable artefact

That's not all that 'building' is...

> but in the context of the server this artefact is already runnable

No it's not. The JIT/interpreter within Deno cannot run this code without doing a build first. This is made very obvious and explicit in the Deno docs.

https://docs.deno.com/runtime/fundamentals/typescript/

> With its built-in TypeScript compiler, Deno will compile your TypeScript code to JavaScript with no extra config needed.

The code is not runnable on the frontend. It needs to be transformed/built before that can happen.

Saying this doesn't have a build step is like saying a python script that compiles and runs a C program from source has no build step.

Yes, I'm aware the code doesn't run natively on the frontend. But we aren't talking about that.
That's exactly what everyone in this comment chain is talking about (even though you just updated your previous comment to make it sound different).