by aphextron · 9y ago · 0 comments
Hopefully, this will lead to real dedicated IDE tooling and standardized libraries for the web along the lines of what's available in iOS and Android native development.
Sure it does. And the myriad of languages that pop up to support WASM will work infinitely better. ES6 was a huge step forward, but it's still a long way from a real language like C#.
I suspect Javascript development will always be a thing, but that front end development will fracture into multiple different languages and runtimes as full WASM support comes online.
However, by then, TypeScript might be so darn good that people choose to keep going with it!
It really does have a better type system than C# in a lot of ways.
Const x = [{x: 3, y: "hi"}, {x: 9, y: "bye"}];
Automatically gets you x: "Array of {x : number, y: string }". And if you declare the same type somewhere else, as long as they're "structurally equivalent" (i.e. same x and y types) you can actually use them interchangeably. You can't do that e.g. with c#, where one class will never be exchangeable with an unrelated class , no matter how similar the definitions.
This lets you do some funny stuff like"subset type detection ": https://gist.github.com/hraban/66c1778cdd31868034b12db93fcce...
All in all, it's more of an oddity than an actual strength, if you ask me. It's necessary to emulate JS semantics, but I wouldn't consider it an advantage in a new language.
Agreed. Duck typing is a killer feature. I can't say how many time's I've rolled a new class for no reason other than data structuring, which would have been far preferable as something just defined inline.
All demonstrated here: https://www.typescriptlang.org/docs/handbook/advanced-types....
The result is a very nice, expressive way to state your types and get maximal benefit from the type checker.
Anders Hejlsberg is in charge of TypeScript and a apt compiler architect with a proven track record(turbo pascal, delphi, .net/C#).
You can think of webassembly more like a common standard akin to the JVM specification. Anyone can implement the spec.
It's a formal definition of what people are doing with JS.
downsides will be some proprietary solutions will crop up.