Earlier quoted context omitted.
I'm curious what criteria you used to pick Flow vs. Typescript.
I remember doing a head to head comparison between Flow and Typescript back in 2015 or sometime around then, and flow came out top at the time. Main pull for flow for me was strict null checking and disjoint unions, which typescript lacked at the time. About a year later typescript got strict null checks and discriminated unions, and from that point on typescript just kept improving, the community type defintiions ke…
TypeScript 5.0
171–180 of 332 posts
Re: TypeScript 5.0
#172Earlier quoted context omitted.
I used to think so too, until I tried Rust. By comparison, JavaScript (and by extension, TypeScript) is still lacking fundamental features and the library ecosystem situation is pretty bad. I wish there was a modern language that took all the good non-manual-memory-management things from Rust and added a GC and some immutable data structures. Error handling, enums, macros (with compile_error! / diagnostics API), trai…
Have you tried C#? Sounds like it would fit your needs perfectly, additionally benefitting from a huge ecosystem behind it.
Re: TypeScript 5.0
#173Your regular reminder, that it’s just a regular release, since typescript don’t follow semver. After 4.9 goes 5.0
Re: TypeScript 5.0
#174Earlier quoted context omitted.
Is there a reason for this? Why even have the decimal if 4.9 -> 5.0 is just as significant as 4.8 -> 4.9. Just make it v49 -> v50 and remove the ambiguity. What am I missing?
One downside to having a version 4.10 is that some sorting algorithms put this release between 4.1 and 4.2 and not after 4.9. But yeah, they should just go ahead and follow semver from now on.
Re: TypeScript 5.0
#175I wonder when will be Typescript done, there is only so much that one can do adding a type system to JavaScript, without starting to become C++ like complexity language, which arguably already is.
It's already there. There are less and less new type features, all they do is implement any new ECMAscript proposals that made it to stage 3 at least. If you look at the changes of this and the last few releases, it's mostly internals, tooling and handling and other non-type things. Decorators are in TS 5 now because they made it to stage 3 last year. They have to follow the other current and future ECMAscript propos…
At least we get lots of opportunities for interview questions.
Re: TypeScript 5.0
#176Earlier quoted context omitted.
Have you tried C#? Sounds like it would fit your needs perfectly, additionally benefitting from a huge ecosystem behind it.
How does the verbosity in C# compare to Java's? And are big C# codebases littered with annotations and "dependency inversion" Java Spring boilerplate-y crap? I ask because I have never delved into C# only heard it's Microsoft's Java. And I am no fan of the original Java at all so C# gives me pause.
Re: TypeScript 5.0
#177Earlier quoted context omitted.
> I have a strange take - I think Typescript types are better most other languages, including Java, C++ and Go. It's strange since TypeScript is adding types to a weakly typed language. Typescript types don't exist at run time, at all. So it's easy to be better when your language is merely about static analysis as it will not enforce any sort of type system during runtime. Java, Go or C++ have different constraints.
that's a false equivocation in the sense that you just moved the goalposts by defining what "runtime" means. There are no types whatsoever as far as processors are concerned. No types in assembly Not for Go or Java, not for C, and not for Rust. All you gotta do is keep compiling.
Here's types existing at runtime: https://go.dev/play/p/rc--yVzJ9bt
Re: TypeScript 5.0
#178Earlier quoted context omitted.
And it doesn't hurt that the TypeScript team is so great. We've seen some public apologies from the Flow team on this topic so I don't feel like I'm talking behind anyone's back if I say they ended up truly not being up to the task of being what TypeScript is today.
Any links to their apologies? I don't understand why they apologized.
Re: TypeScript 5.0
#179I wish MS will fork Typescript into a new language altogether that transpiles to JS or compiles to WASM. In that case, they can remove all JS weirdness from it, simplify it, add a proper standard library, and add other good parts from other (especially functional) languages to it. My wish list for such a language (in addition to what is already in Typescript), in no particular order: - Generic object literals (Why sh…
If you're breaking backwards compatibility then my number one request is replacing UTF-16 with UTF-8 for strings and nothing else comes close.