I really enjoy typescript and have been yearning for a typescript runtime but I can't help but laugh that I left java all those years ago to finally seek something a lot closer to java. I guess we all just wanted java with JIT, more feature rich type system and gradual typing. Also for all the shortcomings of npm ecosystem, it is a lot less daunting and more fun to be using libraries in this ecosystem. And surprising…
Typescript is way better than Java, in my experience. It's a lot less verbose. A lot more flexible.
Node.js adds experimental support for TypeScript
161–170 of 570 posts
Re: Node.js adds experimental support for TypeScript
#162Re: Node.js adds experimental support for TypeScript
#163Re: Node.js adds experimental support for TypeScript
#164Earlier quoted context omitted.
Yeah, my personal experience is that easily 95% of devs I work with/have met in person, if not closer to 99%, prefer statically typed languages. Maybe that’s a biased sample, but I do think the overall preference among devs is very strong. I also see JS slowly, more-or-less becoming TypeScript over time.
My days of being a real software developer are long behind me. So I'm totally willing to accept that I'm wrong here. But when I build a POC in particular, there's a LOT of power and flexibility granted by not giving a fuck about types. Suddenly I can accept non well defined data types (depending on my implementation) and can persist data that otherwise would have taken code changes and approval processes to accept. I…
Re: Node.js adds experimental support for TypeScript
#165I really enjoy typescript and have been yearning for a typescript runtime but I can't help but laugh that I left java all those years ago to finally seek something a lot closer to java. I guess we all just wanted java with JIT, more feature rich type system and gradual typing. Also for all the shortcomings of npm ecosystem, it is a lot less daunting and more fun to be using libraries in this ecosystem. And surprising…
In Typescript you have far more freedom, and all the benefits of strong types.
Re: Node.js adds experimental support for TypeScript
#166Re: Node.js adds experimental support for TypeScript
#167Earlier quoted context omitted.
Beyond ugly. They should just make TS official and be done with it. E: I thought it was JSDoc proposal. Ignore the comment.
What do you mean ugly? This basically is making Typescript official. They just can't have browsers doing the actual type checking because there isn't a specification for how to do that, and writing one would be extremely complicated, and I'm not sure what the point would be anyway.
Re: Node.js adds experimental support for TypeScript
#168Earlier quoted context omitted.
Native Java via GraalVM starts up in milliseconds.
And it has to go through slow compilation step. With Node you can have a cake and eat it too.
Re: Node.js adds experimental support for TypeScript
#169It would be nice for debugging if at least simple npms could just bundle their .ts files without any processing, so we could see the comments and types as they existed in the git repo. Apps can always minify them later. (I use Deno, but also use some npms.)
You can simply create npm packages which contain only the 'unprocessed' TS source files (or really any type of files - for instance I experimented with using npm as package for C/C++ projects in the past, it works just fine). Pre-bundling or compiling from TS to JS is just a convention. And in case of bundling not a good one IMHO, because bundling should only be a final step in the top-level project. One good reason…
Re: Node.js adds experimental support for TypeScript
#170Earlier quoted context omitted.
This is the first time I'm hearing such a claim. In C# you can't work with optional generics because an optional reference type is different from an optional value type. C#s poor type-inference often requires you to type out types thrice. You can't declare constants or class members with type-inferrence. The only way to define sum-types (A | B | C) is through intefaces and I'm pretty sure they can't be sealed. Defini…
C# has record (product) types now.
{name: string} & {birthday: Date}
becomes a single type with both properties.