News for hackers. Stuff that matters.
Re:A 10x Faster TypeScript by pseudopersonal on Tuesday March 11, 2025 @10:58AM (#43333110)
It is for me. If someone says TypeScript is faster than X, they rarely mean the build time. I understand other people's points about TypeScript not being a runtime at all and only being a compiler, but when casually saying "TypeScript is faster than say ruby", people do not mean the compiler.
Re:A 10x Faster TypeScript by dimitropoulos on Tuesday March 11, 2025 @11:48AM (#43333665)
well, thanks for explaining. we might just simply disagree here. when I hear "TypeScript" I think of TypeScript, and when I hear "JavaScript" I think of JavaScript. I know what you mean re: casually speaking, but this is a blogpost from the TypeScript team. That context is there, too. I think if the same title were from an AWS release note, I'd totally see what you mean.
Re:A 10x Faster TypeScript by wrs on Tuesday March 11, 2025 @12:24PM (#43334093)
Typescript is JavaScript at runtime. It’s not a separate language, just like Python with type annotations (TypePython?) is just Python at runtime. Both are just type annotations that get stripped away before anything tries to run the code. That’s the genius of the idea and why it’s so easily adopted.
Re:A 10x Faster TypeScript by Tadpole9181 on Tuesday March 11, 2025 @01:08PM (#43334687)
It is quite literally a separate language. Python's type hints are a part of the Python specification and all valid Python type hints will run in any compliant Python runtime. Typescript is not, in any way, valid JavaScript. The moment you add any type syntax, you can no longer run the code in Node or Browsers without enabling a special preprocess step.
Re:A 10x Faster TypeScript by hansifer on Tuesday March 11, 2025 @06:15PM (#43337669)
Do you think JSX is a separate language?
Re:A 10x Faster TypeScript by Tadpole9181 on Tuesday March 11, 2025 @07:36PM (#43338315)
Yes, JSX is a superset of JS and will not work in any tooling that is not explicitly JSX compatible. JS grammars will not parse it, it's not standard.
Re:A 10x Faster TypeScript by johnfn on Tuesday March 11, 2025 @12:51PM (#43334456)
But no one actually says "TypeScript is faster than say ruby". They probably say "node is faster than say ruby" or maybe "bun is faster than say ruby". Perhaps they say "JavaScript is faster than say ruby", although even that is underspecified.
Re:A 10x Faster TypeScript by Tadpole9181 on Tuesday March 11, 2025 @01:05PM (#43334649)
Then read the article? I don't get it - Typescript, to anyone familiar, is not a language runtime. It does not optimize. It is a transpiler. If you don't even know this much about Typescript, you aren't the audience and lack prerequisite knowledge. Go read anything on the topic.

If someone posted an article talking about the "handedness" of DNA or something, I wouldn't complain "oh, you confused me, I thought you were saying DNA has hands!"

Re:A 10x Faster TypeScript by pnw_throwaway on Tuesday March 11, 2025 @05:47PM (#43337412)
That’d be the autism kicking in, you’re gonna have to be 10% less miserable if you want anyone to put up with you.