Specifically, do you worry that Microsoft is going to eventually do the Microsoft thing and horribly fuck it up for everyone? I’ve really grown to appreciate the language itself, but I’m wary of it getting too ingrained at work only to have the rug pulled out from under us when it’s become hard to back out.
Edit: not really “pulling the rug”, but, you know, doing the Microsoft classic.
I’m not concerned about the Microsoft’s involvement. TypeScript shows an immature tooling ecosystem even on its own merits.
I posted some of my concerns earlier, along with a basic problem challenge (that I can easily do in many other languages) that nobody managed to solve: https://programming.dev/comment/2734178
This comment just seems weird no matter which angle I try to approach it from.
It’s over a decade old now. I wouldn’t call that immature.
Looking at your linked comment…
hello.ts
containing:console.log("hello world");
deno run hello.ts
(time taken to run command: 0.037s)Yes, that tends to happen as ecosystems evolve over time. Typescript allows developers to use modern standards-compliant modules, while maintaining backwards compatibility for older code.
One of typescript’s strengths is that its type system isn’t all or nothing. Typescript will support duck typers, but it isn’t forced or limited to that. You can add as much or as little typing as you want. In theory, this means that the language supports simple beginners up to experts creating turing-complete theorem solvers at compile time. In practice, this means a much smoother onboarding and porting experience.
I’m not sure if this is the basic problem challenge or the hello world example was. It seems a bit ambiguous as to what you really want, but it’s easy to create a module that takes inputs and produces outputs while running on backend servers, in browsers, and in CLIs.
Obviously the actual programs are trivial. The question is, how are the tools supposed to be used?
So you say to use
deno
? Out of all the tutorials I found telling me what tools to use, that wasn’t one of them (I really thought this “typescript” package would be the thing I was supposed to use; I just checked again on a hot cache and it was 1.7 seconds real time, 4.5 seconds cpu time, only 2.9 seconds if I pin everything to a single core). And I swear I just saw this week, people saying “seriously, don’t use deno”. It also doesn’t seem to address the browser use case at all though.In other languages I know, I know how to write 4 files (the fib library and 3 frontends), and compile and/or execute them separately. I know how to shove all of them into a single blob with multiple entry points selected dynamically. I know how to shove just one frontend with the library into a single executable. I know how to separately compile the library and each frontend, producing 4 separate artifacts, with the library being dynamically replaceable. I even know how to leave them as loose files and execute them directly (barring things like C). I can choose between these things all in a single codebase, since there are no hard-coded project filenames.
I learned these things because I knew I wanted the ability from previous languages I’d learned, and very quickly found how the new language’s tools supported that.
I don’t have that for TS (JS itself seems to be fine, since I have yet to actually need all the polyfill spam). And every time I try to find an answer, I get something that contradicts everything I read before.
That is why I say that TS is a hopelessly immature ecosystem.
It sounds like to me that you’ve taken your knowledge of your commonly used languages for granted, and assumed a new language would be just as easy. But if you watch a developer who is dipping their toe into that ecosystem for the first time you’ll find them making mistakes and running into footguns you didn’t know were possible.
Regardless of the language, not having a proper guide leaves devs susceptible to the incorrect blogospam that’s out there, where engagement is rewarded over correctness.
Ignore all of the blogospam.
The two things you need to know:
Here’s my shortened version of number 2.
The beginning:
The false start:
The resumption:
async
/await
/Promise()
syntax sugaring, to make asynchronous programming easier...
(rest/spread operator) syntax sugaring, to make destructuring and variadic functions easier??
Nullish coalescing operator syntax sugaring??=
/&&=
/||=
Logical assignment syntax sugaringThe current state of things
Language-wise
Runtime-wise
Tooling wise
For your simple fibonacci example:
console.log()
and see result in browser’s console.Deno.serve()
and see result in network requests/responsesconsole.log()
and see result in terminal