Live data from Hacker News

Glimmer.js: What’s the Deal with TypeScript?

medium.com

21–30 of 112 posts

Re: Glimmer.js: What’s the Deal with TypeScript?

#21
post #9

>At the end of the day, though, JavaScript is the language of the web. And when webassembly arrives that will be over, and Typescript will be deprecated. I can't wait for a better modern language like Haskell, Python, Livescript, etc.. built on top of webassembly. Then we can finally stop trying to fix Javascript's flaws with new language features.

> webassembly.

is basically a better way to do ASM.js . How many Python,Haskell,Livescript have been built on top of ASM.js ?

Do you really believe you can make your users download 10s of megabytes of binaries each time they visit a website just to bootstrap a language? And i'm not even talking about the runtime...

Right now, the only viable languages for webassembly are the ones that don't use garbage collection and have a limited runtime, Rust,C and C++ .

Re: Glimmer.js: What’s the Deal with TypeScript?

#22
post #11
post #8

Earlier quoted context omitted.

Have you tried Elm? Id love to know your experiences.

I haven't; I haven't tried Flow either which looked promising. For kicks I tried the online Elm demo. Offhand it doesn't seem like Elm highlights errors inline(?). The syntax also looks a little foreign, whereas TS generally still looks like JS with a few exceptions. I imagine Elm/Flow both have this, but another thing I like that TS does in VSCode at least with a watching task is collecting errors project-wide in a…

Yes, the Elm syntax is more Haskell than JS. Not C based, which makes it an outlier.

Please try Elm and email me with your feedback. Id love to know more about it. Im a programming languages nerd. :)

Re: Glimmer.js: What’s the Deal with TypeScript?

#23
Am I the only one who thinks typed Javascript, wether it's TypeScript or Flow, is a really flakey experience?

I really enjoy Swift, so I'm not put off by types. But I find the experience of working in a real typed language to be very different to working with Flow or Typescript, where the types are for pretend, and type definitions are wrong often enough to be a real pain. And I found my self evaluating npm packages based on their type definitions, and not their suitability for the task, which seems bonkers to me.

Also, I don't ever recall staying late to track down a bug that types would have fixed. But I've wasted many an hour tracking down bugs caused by mutations, and the state of Immutability and Typed Javascript is pretty grim as far as I can tell, unless I'm missing something.

Re: Glimmer.js: What’s the Deal with TypeScript?

#25
post #9

>At the end of the day, though, JavaScript is the language of the web. And when webassembly arrives that will be over, and Typescript will be deprecated. I can't wait for a better modern language like Haskell, Python, Livescript, etc.. built on top of webassembly. Then we can finally stop trying to fix Javascript's flaws with new language features.

And I can't wait for the rude awakening anti-JS developers have when they realise the vast majority of issues (particularly, performance) come from the DOM, not JavaScript. (And the first version of WebAssembly can't touch the DOM anyway)

If people start writing Python for the web for no other reason than they just dislike JavaScript we're going to be forcing users to download a dozen different runtimes, just because of developer preference. This isn't a good thing.

Re: Glimmer.js: What’s the Deal with TypeScript?

#26

What turns me off immediately about TypeScript (and examples in the article show it) is the use of the class construct. If I could see some examples of teams writing TypeScript without falling into the use of classes I would feel a lot better about it. I am in full agreement with Douglas Crockford and others that adding pseudo-classes to JS was a big mistake.

I'm curious as to why you don't like the use of classes. Are you against classes in all languages or just JavaScript?

Re: Glimmer.js: What’s the Deal with TypeScript?

#27

Am I the only one who thinks typed Javascript, wether it's TypeScript or Flow, is a really flakey experience? I really enjoy Swift, so I'm not put off by types. But I find the experience of working in a real typed language to be very different to working with Flow or Typescript, where the types are for pretend, and type definitions are wrong often enough to be a real pain. And I found my self evaluating npm packages…

Types are pretend in TypeScript and Flow the same way that types are pretend in any other typed language. Types are used at compile-time and not runtime in both cases.

Re: Glimmer.js: What’s the Deal with TypeScript?

#29

What turns me off immediately about TypeScript (and examples in the article show it) is the use of the class construct. If I could see some examples of teams writing TypeScript without falling into the use of classes I would feel a lot better about it. I am in full agreement with Douglas Crockford and others that adding pseudo-classes to JS was a big mistake.

I partially agree. Something to consider: Like the callbacks, prototypes are very flexible, so this flexibility comes at the cost of interoperability. When you have a standard way to declare classes, methods and meta data for them, this information is easier to consume from other libraries.

Re: Glimmer.js: What’s the Deal with TypeScript?

#30
post #21
post #9

>At the end of the day, though, JavaScript is the language of the web. And when webassembly arrives that will be over, and Typescript will be deprecated. I can't wait for a better modern language like Haskell, Python, Livescript, etc.. built on top of webassembly. Then we can finally stop trying to fix Javascript's flaws with new language features.

> webassembly. is basically a better way to do ASM.js . How many Python,Haskell,Livescript have been built on top of ASM.js ? Do you really believe you can make your users download 10s of megabytes of binaries each time they visit a website just to bootstrap a language? And i'm not even talking about the runtime... Right now, the only viable languages for webassembly are the ones that don't use garbage collection and…

We make our users download tens of megabytes of shitty unoptimized JS for tracking, ad networks, unoptimized images, autoplaying videos, and so on and so forth now.
Post reply on HN