Live data from Hacker News

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

medium.com

31–40 of 112 posts

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

#31
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.

We'll just have a Babel of dialects, pun intended. There might not be a technical reason for having JS, but there's a social one -- we've got plenty of people who call themselvs "JavaScript programmers", and people tend to be set in their ways to an awful degree.

I mean, on the backend, there's no ultimate technical reason why you couldn't switch -- the closest you can come to the browser situation is the limited PHP hoster of the early oughts -- and still we don't see a rapid progress away from awful languages. Just more people duct taping said languages into something slightly more sane.

We'll get the same for JS. It's the new Pascal/C in that regard.

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

#32

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?

A lot of people are into the "functional JS!!1!!1!!" hype and blindly dislike anything related to OOP with little information.

Also, TS does not force you into OOP. TS codebase itself does not have any classes.

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

#33
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 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.

Much of that is already possible and guess what, neither TypeScript nor JavaScript are deprecated.

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

#35

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.

In contrast to many typed languages, currently in Typescript, you can't do any kind of reflection so runtime really has no access to the type system.

Well, I still love TS though.

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

#37

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…

> the state of Immutability and Typed Javascript is pretty grim as far as I can tell, unless I'm missing something.

You definitely are missing something. Immutablejs and TS go together fine. Assigning to an immutable property or object is a syntax error instead of a runtime error. It's great.

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

#38

Earlier quoted context omitted.

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.

In contrast to many typed languages, currently in Typescript, you can't do any kind of reflection so runtime really has no access to the type system. Well, I still love TS though.

There is the possibility of decorators for stuff like this. Angular makes a lot of use of them.

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

#39
post #2

I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript.…

> Perhaps later Google will throw their hat into the ring and introduce GScript

Google had one called Atscript, but rallied Angular 2 around Typescript instead.

http://sdtimes.com/google-microsoft-combine-typescript-atscr...

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

#40
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.

At the end of the day, JS will always be the language of the web. You're still going to be doing DOM manipulation through JS. WASM is really going to benefit people who want to do more heavy duty edge cases such as image processing.

Is this because browsers won't expose DOM manipulation at the WASM level, or is there a different reason?
Post reply on HN