IMO this is a good decision. I much prefer a platform with a small API than I can personally extend over a large platform that has specific customization options or lots of extra features that all just "kind of" solve whatever problem I have.
Reading this makes me more interested in the project than I was before.
One quick recommendation, it was kind of hard to find the documentation for the Webpack free compiler (https://www.npmjs.com/package/walt-compiler). This is purely anecdotal, but I suspect that at least some of the people who are turned on by having a low-level library that doesn't include Typescript niceties will be turned off by seeing the quick-start immediately say to install Webpack. Might be a good idea to have the compiler documentation inside the wiki alongside the quick-start?
The goal is to "Define a portable, size- and load-time-efficient binary format to serve as a compilation target which can be compiled to execute at native speed by taking advantage of common hardware capabilities...."[0].
In the beginning Assembly became bytecode and CPUs included interpreters via microcode, then everything was supposed to be executed directly by hardware gates, now Assembly has become another form of bytecode and all major CPUs have reverted back to microcode.
Same applies to GPUs.
Everything old is new again, indeed.
Javascript is far from perfect, but it has improved by leaps and bounds the last few years. WebAssembly is great, but a variant of Javascript or other high-level languages will continue to dominate web development, not C. People aren't going to "escape" from Javascript to C, except certain niches where performance is vital.
If you like your JavaScript, you can keep your JavaScript. You have no reason to care about WebAssembly. Why would you build a JavaScript imitation on WebAssembly when you can just use JavaScipt?
WebAssembly is for the rest of us.
Not everyone enjoys writing verbose S-Expressions [1], even if it makes for a good canonical format.
If you despise JavaScript so much that you can't bear the thought of something that vaguely looks like JavaScript, then don't worry there are other "skins" for writing WebAssembly [2-4] and it should not be too hard to write your own.
Finally, nobody owns WebAssembly. It's for clever people like yourself just as much as it is for dirty JavaScript programmers like me.
[1] https://developer.mozilla.org/en-US/docs/WebAssembly/Text_fo...
[2] https://github.com/tmcw/wah
[3] https://github.com/serprex/luwa
[4] https://medium.com/cirru-project/webassembly-s-expression-an...
WebAssembly is for everyone.
It's has been a weird and interesting project, but that's not really a bad thing is it.
Oh gosh, let's not forget what happens when you try to use map and parseInt together.
Returns
[1,2,3,4,5,6,7,8,9,10]
This is simple, straightforward, and wrong:
["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"].map(parseInt)
This doesn't work because map() stuffs a counter into the second argument of parseInt(), which is expecting a radix for its second argument. So the iterations of the map go like this: parseInt("1", 0)
parseInt("2", 1)
parseInt("3", 2)
…and so on, which obviously gives garbage results. JavaScript is littered with these kinds of weird edge cases. Even your example with the workaround isn't 100% reliable, it's browser-dependent – when you have leading zeros in your strings, some browsers will interpret them as octal, and some won't.Language version dependent rather than browser dependent.
It may seem the same (after all, different browsers implement different versions of the language), but it's a bit different, if you say 'browser-dependent' it makes it sound like there is no standard when in fact, the leading zero behaviour hasn't been the case since ecmascript 5. You'll struggle to find a browser in common use that doesn't support at least ecmascript 5. It's as browser-dependent as the array.map function which was added at the same time.
Your example code would never have the leading 0 problem since you're using array.map and array.map didn't exist in the engines that had that leading 0 'feature'.
["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"].map(parseInt);
The two projects are really similar no doubt. I can't speak for AssemblyScript, but my own motivation was simple. I wanted to learn WebAssembly and I wanted an accessible platform to do so with. At the time this wasn't really possible, tools like emscripten took forever to set up and were clunky to use. Plus I knew C already, I wanted to learn WebAssembly instead.
So where Walt is an attempt to write WebAssembly with a familiar syntax, AssemblyScript is an attempt to compile TypeScript to WebAssembly. To do so AssemblyScript comes with many more niceties/features out of the box IIRC, like optional(?) GC for example. Walt makes no such attempts and takes a more DIY approach.
Walt also has language extensions, via customizable syntax and compiler pipeline, where AssemblyScript is a TypeScript compiler more or less. My hope is that this allows for a babel-like situation for WebAssembly in the future via the tooling setup for Walt. I don't think this is a goal of AssemblyScript.