6 ms·
As a programming language geek, TypeScript is one of the best things to ever happen to the industry. It's finally dispelled the notion that "types == Java == ba
by simplify 4y ago
As a programming language geek, TypeScript is one of the best things to ever happen to the industry. It's finally dispelled the notion that "types == Java == bad/annoying", and shown how powerful and convenient a type system can actually be.
(This is something that's been possible for decades, but it never hit mainstream before as it's hard to implement it well enough to satisfy the silly preferences of us typical programmers :)).
- mhh__ 4y ago> industry. It's finally dispelled the notion that "types == Java == bad/annoying", Where is this industry and how do I avoid it?
- deleted 4y ago[deleted]
- zdragnar 4y agoAnywhere in non-enterprise web development in the heyday of Ruby/ python / php. Static typing fell out of favor hard among certain crowds. Typescript brought many of them back to the world of static typing, and all three of the aforementioned languages are getting more static support, so it isn't nearly so prevalent as say 10 or 15 years ago.
- the_duke 4y agoTypescript has a decent type system, but it is really held back by being "just" a type checker for JS, with all the JS semantics. The way sum types are done in TS is really awkward. The type system is unsound. What's worse is that you never have a guarantee that the types are actually correct at runtime, due to bad third party typings, compiler limitations, use of any, ... It's still a lot better than using plain JS, and a lot of the limitations aren't by choice, but come from the need to compile down to and remain compatible with plain JS. It just could be so much better.
- enlyth 4y agoI wish Microsoft would make a language almost exactly like Typescript, but where code has to be strictly typed (no any, unknown, etc.) and it would compile to a normal binary, with some sort of GC, for multiple platforms. It would hit the sweet spot for me, I know Rust is popular these days, but it seems like it's made for type astronauts, and sometimes I just want to write some code and get things done quickly and don't care about squeezing out every last drop of bare metal performance or abstracting seven layers of types to please a borrow checker.
- lioeters 4y agoI suppose AssemblyScript fits some of those points: no any or unknown; compiles to a binary; GC; cross-platform.
- math_dandy 4y agoHow about F#?
- tlrobinson 4y agoIt sounds like you want “deno compile” (https://deno.land/manual@v1.25.4/tools/compiler https://deno.land/manual@v1.25.4/tools/compiler) plus “no-explicit-any” eslint rule (https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md https://github.com/typescript-eslint/typescript-eslint/blob/...). Or are you wanting a language with different semantics that could be compiled to actual machine code?
- yencabulator 4y agoThat still allows `x as string` and many other traps. Typescript just isn't type-safe, and this has bitten me so many times in real world projects with strict mode and all. The best thing I can say about Typescript is that it's an improvement over Javascript.
- d3nj4l 4y agoYou want C# with dotnet AOT.