Live data from Hacker News

Deno will stop using TypeScript

startfunction.com

211–220 of 359 posts

Re: Deno will stop using TypeScript

#211

I'm doing a medium/large project in Coffeescript 2 and it's totally awesome. Rarely a type related bug and I'm progressing waaay faster than having to deal with TS in my way. But for anyone enjoying to specify their types in detail, have fun!

wow that’s cool to hear! I read about coffee 2 awhile ago and then heard nothing of it. I used to love coffeescript, arguably more than vanilla js, but forces that be led me to move on.

are you working with a team? if so was it easy to get buy-in?

Re: Deno will stop using TypeScript

#212
post #22

Earlier quoted context omitted.

You don't have to write as many tests when you use static typing, because your method contracts are solid. You can refactor your entire codebase with a few operations and don't have to worry about anything breaking. Is your timestamp in seconds? Millis? Is it a duration? Does it have a time zone? Have you ever written a method that returns more than one type of thing? Or had polymorphic inputs? Where are your dynamic…

Forgive me, but when I program I know what the variables I am working with are doing, and what kind of data they are storing. That’s the least of my problems. I don’t write a big mess of code, I’m constantly working iteratively on a small piece of code to make it perfect. Usually first pass is to make it perfect, then I refactor it right away to make it readable. I work that way, function by function. I never have th…

> Forgive me, but when I program I know what the variables I am working with are doing, and what kind of data they are storing.

Can you say the same about all your dependencies?

Re: Deno will stop using TypeScript

#213
> I never have the class of bugs in my projects that people seem to laud about typing to solve. It’s kind of ridiculous

You do have that class of bug. That's like a cpp programmer saying they don't need smart-pointers because they never introduce memory leak bugs. You're a human.

Re: Deno will stop using TypeScript

#214
I'm stoked on this change, frankly the TS layer being included in Deno felt like a mistake from the get-go and I'm glad they've come around on it. I've seen many transpile-to-JS languages come and go. Javascript is eternal.

(Though I also think TS is a verbose mess made so that enterprise programmers/managers can feel safe, but even if it was great I still think this would have been a good choice)

Re: Deno will stop using TypeScript

#215

Using JS instead of TypeScript is very short-sighted and they will regret it, eventually. Sounds like they got frustrated and gave up. Their arguments remind me of someone saying they want to use Assembly Language instead of C++, because assemblers are faster than compilers, or to not have to worry about memory heap issues, etc. All you're doing by switching from TS to JS, is trading one set of minor problems (which…

Spoken like someone who's never solved problems with medium-to-large scale JS projects... criticising people who have.

That is one key thing I see a disconnect with. I definitely can see the value in having static types in a long-lived/large js project, but at the same time 1) how long does the average js project really stay relevant, 2) people have got by just fine w/o it so far. I’m kind of mixed on it, but for my new web app I’m working on I decided to use vanilla js because it feels much more efficient.

Re: Deno will stop using TypeScript

#217

I'm a little shocked at some of the outcry in this thread. People are making it sound like they're switching from Rust to Ruby or extolling the virtues of types: TypeScript does absolutely nothing for you at runtime. There are no types, there are no type checks, its all the same guarantees as good ol' JavaScript. You still can't trust function parameters to be what they say. It's a Babel configuration with inline doc…

Static typing, by definition, does nothing for you at runtime.

Re: Deno will stop using TypeScript

#218

Earlier quoted context omitted.

Working on half a million LOC TypeScript codebase. All strict flags up, low-2-digit team size. We don't really run into many problems. TypeScript is not perfect, but developer happiness and productivity have definitely increased since we adopted it, and defect rates have dropped significantly --while increasing the size of the team & working on more features.

I have a hard time believing that. We have 10k lines of typescript and that take forever to compile compared to 5x more of the ReasonML code we have that compiles instantly

You have a hard time believing that their team experienced more happiness and productivity with TS...because your ReasonML code compiles a lot faster than your TS code?

Re: Deno will stop using TypeScript

#219
post #48

Earlier quoted context omitted.

Most of the project is and will still be written in Rust, a statically typed language, so saying that the "project" will drop static types is an overstatement. Based on the design document where the devs talk about this, the TS code in question is about 10k lines of glue code between Rust & userland JS/TS.

If it’s only 10k lines of glue code how are they running into minutes long compiles?

Haven't looked at their build, but it's almost certainly the case that they are generating some sort of rust binding from the typescript code and the compilation times are actually from needing to recompile rust.

Re: Deno will stop using TypeScript

#220

Earlier quoted context omitted.

Sure other languages have some pieces of the puzzle - python has tons of libraries and is easy to understand, golang has great performance and is easy to write, etc. But I have yet to find a language that has the same set of features except JS. If you want to offer up an alternative, please do so.

JS has zero unique set of feature. There is not a single feature in JS you can't find elsewhere, often better implemented. If anything, the vast majority of scripting languages (Python, Ruby, PHP...) have more features than JS. JS is so lacking in features that half of its ecosystem is dedicated to compensate for that (typescript, babel, webpack, undersacore...).

JS has a great future: first class ubiquitous promise + async-everything. Can't find that in Ruby/Python/PHP, you have to use something like Twisted/asyncio which limits you to a bolted on subset of the ecosystem, unlike in JS.

Very dishonest take btw.

Here's a forum of people who could tell you why they use JS instead of your $favelang, yet instead of trying to figure it out, you just assume everyone is lazy or a junior dev except for you.

You should be a little more suspicious of convenient little truths like that where you're the cool elite engineer protagonist and everyone else is a bumbling idiot.

I use JS on the server. Any questions for me?

Post reply on HN