>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.
To run python on WebAssembly you would have to compile the entire CPython executable, and every single dependency it has, into WebAssembly, then ship that giant executable with every page so you could then run Python code with it. You would then also most likely need a special library, which at some point someone will have to write or you'll have to write it yourself, to give Python a clean interface to the DOM. All…
Glimmer.js: What’s the Deal with TypeScript?
91–100 of 112 posts
Re: Glimmer.js: What’s the Deal with TypeScript?
#92Earlier quoted context omitted.
IMO I feel like it is going to be a challenge to integrate the GC of another language with the GC of the JavaScript/DOM, and if so we'll be keeping JavaScript going for a while.
WebAssembly doesn't have a GC, And I don't see any reason why the DOM should be subject to a JS GC.
"'compile the VM' strategies increase the size of
distributed code, lose browser devtools integration, can
have cross-language cycle-collection problems and miss
optimizations that require integration with the browser" [1].
My prev comment was speculative, but my point is that its not going to be a piece of cake to just drop another high-level language on-top of WASM and use it as a 'better' scripting language without having to pay some overhead costs, one being GC issues.[1] https://github.com/WebAssembly/design/blob/master/FAQ.md#is-...
Re: Glimmer.js: What’s the Deal with TypeScript?
#93Re: Glimmer.js: What’s the Deal with TypeScript?
#94What sold me on TypeScript was that it didn't just add features, it actively solved a problem I'd been experiencing. Once a JavaScript project scales beyond what can fit in your head, JS's initial productivity boost crumbles because you have to constantly double back and make sure your methods/constructors/etc. are correctly used, which properties are optional, etc... A lot of the debugging happens in runtime and god…
Have you tried Elm? Id love to know your experiences.
In my experience whenever I worked on a JS project on my own, there was an upper limit to how far I could keep writing the code on my own. After that, I had to spend time in doing other things (like writing Integration tests, lots and lots of unit tests, or refactor existing code because I realized that there are many issues unveiled).
But now, with Elm, it's like a whole set of unit tests are being written at the time of writing code which take care of plenty of common errors usually made due to lack of a good type system.
Add to that the usage of Maybe types (which are very beneficial in avoiding some UI antipatterns[1]), and the Reactive Programming pattern, I feel like I am writing a lot less code than what I am used to writing in JS projects.
I highly recommend Elm to anyone who wants to write a personal project, you'd see what benefits I'm talking about.
1. http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipatt...
Re: Glimmer.js: What’s the Deal with TypeScript?
#95Earlier quoted context omitted.
What would you replace the DOM with?
I honestly have no idea. It does so much that I don't know where you'd start - but I suspect that's also the problem. I remember seeing a demo of React Canvas a few years ago - basically, recreating a "DOM" of sorts inside a canvas tag - and the performance was crazy. Beautiful 60fps touch interactions. But, of course, it only does a tiny subset of what the DOM does. I'm still waiting for a good reason to use it myse…
Re: Glimmer.js: What’s the Deal with TypeScript?
#96Earlier 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.
Are they used at compile time with TS or Flow? I thought they were just stripped out.
Re: Glimmer.js: What’s the Deal with TypeScript?
#97Well, if we already transpile ES7 to JS then why not tanspile TypeScript instead because of all the added benefits?
Because eventually in a couple of years you can take your ES7 code and remove the transpiration and it will all work seamlessly. Not so much with Typescript.
Re: Glimmer.js: What’s the Deal with TypeScript?
#98Well, if we already transpile ES7 to JS then why not tanspile TypeScript instead because of all the added benefits?
Because eventually in a couple of years you can take your ES7 code and remove the transpiration and it will all work seamlessly. Not so much with Typescript.
Re: Glimmer.js: What’s the Deal with TypeScript?
#99Re: Glimmer.js: What’s the Deal with TypeScript?
#100There's two things that really stand out for me on TypeScript. There are other positive attributes, but these are the two things I liked. The first is that it made some specific workflows a lot easier. In particular, I'm working on some pre-alpha libraries where there's movement on how the API interface is defined. TypeScript made that transition a lot easier. Yes, my testing would have eventually caught all the meth…
For google-ability, TypeScript has structural types, in contrast with Java which has nominal types.