News for hackers. Stuff that matters.
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by xiaodai on Sunday July 26, 2026 @11:11PM (#49064802)
how can you compile it if javascript is a valid subset of typescript? confused.
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by panzi on Sunday July 26, 2026 @11:39PM (#49064951)
Either it is only accepting a subset of TypeScript, or it is still interpreting the parts that don't have enough types. Given other comments here it sounds like the later.
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by queenkjuul on Monday July 27, 2026 @03:34AM (#49066214)
Both, basically. Default is the subset, but you can enable an interpreter
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by lpribis on Monday July 27, 2026 @06:30AM (#49067530)
No idea about this project, but it is very possible to compile a dynamically typed language, without large VM/runtime. See Common Lisp, Julia
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by panzi on Wednesday July 29, 2026 @11:25AM (#49098750)
Yes, and JavaScript itself is JITed. I used interpreted here as a shorthand for interpreted and/or JIT compiled at runtime.
Re:Scriptc by Vercel: TypeScript-to-Native compiler, no Java... by CarpeNecopinus on Monday July 27, 2026 @03:05AM (#49066035)
What it can actually compile is a subset of well-behaved typescript. For anything else it bails out and asks you to ship a JS engine (albeit, not NodeJS) again.