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…
Glimmer.js: What’s the Deal with TypeScript?
81–90 of 112 posts
Re: Glimmer.js: What’s the Deal with TypeScript?
#82There'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…
Re: Glimmer.js: What’s the Deal with TypeScript?
#83I have a project that uses Flow. I've had no complaints with it so far, but I've been craving the IDE support of TypeScript. What's the difference between the type system of TypeScript and Flow? Would it be worthwhile to switch? Part of me wants to wait out the Flow team come up with better IntelliSense support. The `flow ide` command in the release 0.42 is a big step in the right direction. But it seems like TypeScr…
I suspect switching from Flow to TypeScript would be relatively straightforward as far as the types go, but going the other direction would not.
Re: Glimmer.js: What’s the Deal with TypeScript?
#84I have a project that uses Flow. I've had no complaints with it so far, but I've been craving the IDE support of TypeScript. What's the difference between the type system of TypeScript and Flow? Would it be worthwhile to switch? Part of me wants to wait out the Flow team come up with better IntelliSense support. The `flow ide` command in the release 0.42 is a big step in the right direction. But it seems like TypeScr…
Re: Glimmer.js: What’s the Deal with TypeScript?
#85I've done a few typescript projects. Some migrating an existing codebase, some starting from scratch. Every time it has been a nice experience, and with every release it gets nicer. Two of the projects had very complex requirements, and typescript was instrumental in being able to refactor them with confidence. I think the upsides are quite well known by now. Honesty requires me to admit that I did run into some down…
I feel the same way about Elm, F# and Fable, Facebook's ReasonML, and any other language that has an ML type system and compiles to javascript. I think the value becomes more apparent when: a) you work in a large codebase and have to refactor either a large swath of code and/or a critical piece of logic and b) you need to make illegal states unrepresentable. In both cases, I have found having a compiled, ml-typed language extremely helpful.
I think for both Typescript or an ML language, having immutable non-nullable types by default really cuts down on complexity - instead of having to specify everything that's immutable with something like a `const` keyword, you instead have to specifically point out which attritibutes on a type are mutable. That's a small win but has huge benefits - especially when you're trying to debug code.
That's just my two cents anyway.
Re: Glimmer.js: What’s the Deal with TypeScript?
#86Earlier quoted context omitted.
The flagship feature of TS is static typing. That will never exist in JS.
I'd never say never. As I'm sure you're aware, JavaScript has had statically typed arrays since WebGL was introduced. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
console.log("hello");
typedArr[0] = incompatibleType();
In javascript, it will produce "hello" as output, and then a run-time failure.Re: Glimmer.js: What’s the Deal with TypeScript?
#87Earlier quoted context omitted.
Is this because browsers won't expose DOM manipulation at the WASM level, or is there a different reason?
DOM manipulation is going to be available at the WASM level in the future but it's going to be inefficient to do so just as it is inefficient to do image processing in JS right now. The only difference is that JS is the only viable option now if you want to do image processing on the web. WASM exists to solve this problem and complement JS. Hell, look at WASM's and JS's logo. They're two puzzle pieces that fit togeth…
Manipulating the DOM from wasm shouldn't be any slower than Javascript. Slow in general because of the DOM, perhaps, but not because of wasm.
Re: Glimmer.js: What’s the Deal with TypeScript?
#88I 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.…
https://developers.google.com/closure/compiler/
Code checking. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.
Re: Glimmer.js: What’s the Deal with TypeScript?
#89Earlier quoted context omitted.
Have you tried Elm? Id love to know your experiences.
Elm is very different from typescript and is generally a much more involved choice than just "let's make our usual JS strongly typed". - You need to like Elm the language (it's pretty good, but limited, not expressive) - You need to like purity. Time.now or Math.random returns an asynchronous Task. I know why it's done like that, I just don't agree with the tradeoff. - You need to like Elm the ecosystem or be prepare…
Re: Glimmer.js: What’s the Deal with TypeScript?
#90I 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.…
The flagship feature of TS is static typing. That will never exist in JS.