7 ms·
> We write a lot of TypeScript at Cloudflare. It’s the lingua franca of software engineering. This scares me more than Im able to admit, typescript sucks and i
by xnacly 5mo ago
> We write a lot of TypeScript at Cloudflare. It’s the lingua franca of software engineering.
This scares me more than Im able to admit, typescript sucks and in my opinion its way worse than the more commonly used lingua franca of computing, which I would attribute to C. At least C can be used to create shared objects i guess?
- dewey 5mo ago“Typescript sucks” is not really a great reason.
- xnacly 5mo agoWell it does suck for a huge list of reasons but specifically disqualifying for being the lingua franca would be it being controlled by microsoft
- seabrookmx 5mo agoIt's open source. If Microsoft did anything weird it would be immediately forked ala. terraform, ElasticSearch etc. There's so much momentum behind it from the front-end community alone it's not going anywhere. IMO using Typescript sucks because of the node ecosystem/npm. The language itself is passable.
- rvz 5mo agoWell it does suck, and it isn't really great for implementing performant developer tools, such as parsers, formatters and so on. The performance is that bad that the typescript developers are rewriting the language itself in Go. [0] Tells me everything I need to know about how bad typescript is from a performance stand point. [0] https://devblogs.microsoft.com/typescript/typescript-native-port/ https://devblogs.microsoft.com/typescript/typescript-native-...
- braebo 5mo agoThat’s the lsp not runtime. Bun runs Typescript very fast. It’s a fantastic language and ecosystem.
- skydhash 5mo agoI’ve just checked FFI in bun and it’s marked as experimental. There are great libraries in C/C++ world and FFI is kinda table stakes to use them.
- rvz 5mo agoNo where did I say "runtime". Even with Bun it's because of Zig, not TypeScript and that only proves my point even more.
- r_lee 5mo agoyou're right. we should just not use any interpreted/script languages because they're not as fast as compiled ones. why does a CLI tool that just wraps APIs need this native performance?
- wiseowise 5mo agoThe performance is so bad that the most used software in the world is written using it.
- tombert 5mo agoPersonally I haven't felt like Typescript has bought me enough over JavaScript to use it in contexts that I don't have to. I have to use TypeScript for work, and it's "fine", but I guess I haven't found that it helps all that much. I'm not sure why; I guess it's because the web itself is already really flexible that I find that the types don't really buy me a lot since I have to encode that dynamism into it. To be clear, before I get a lecture on type safety and how wonderful you think types are and how they should be in everything: I know. I like types in most languages. I didn't finish but I was doing a PhD in formal methods, and specifically in techniques to apply type safety to temporal logic. I assure you that I have heard all your reasoning for types before.
- steve_adams_86 5mo agoWhy do you think it sucks? I used to dislike JavaScript a lot after learning it and PHP, then using languages like C#. Then TypeScript came along making JS much easier to live with, but has actually become quite nice in some ways. If you use deno as your default runtime, it's almost Go-like in its simplicity when you don't need much. Simple scripts, piping commands into the REPL, built-in linting, testing, etc. It's not that bad! Of course you're welcome to your opinion and we'd likely agree about a lot of what's wrong with it, but I guess I feel a bit more optimistic about TS lately. The runtime is improving, they've got great plans for it, it's actually happening, and LLMs aren't bad at using it either. It's a decent default for me.
- newspaper1 5mo agoI think it sucks because it transpiles to JavaScript and is an interpreted language. Users have to resolve the dependencies themselves and have the correct runtime. I definitely prefer my CLI tools be written in a compiled language with a single binary.
- steve_adams_86 5mo agoI agree, though one cool thing arriving lately (albeit with some major shortcomings) is the ability to compile binaries with deno or bun (and nodejs experimentally, I think). With Go you can compile binaries with bindings for other binaries, like duckdb or sqlite or so on. With deno or bun, you're out of luck. It's such a drag. Regardless, it's been quite useful at my work to be able to send CLI utilities around and know they'll 'just work'. I maintain a few for scientific data processing and gardening (parsing, analysis, cleaning, etc) which is why the lack of duckdb bundling is such a thorn. I do wish I could use Go instead and pack everything directly into the binary.
- r_lee 5mo agoyou can already "compile" TS binaries with deno, but it'll include the runtime in it and etc. so it'll take some disk space but I think these days it's less of a concern than before