Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here is a direct quote from the article: "WebAssembly, on the other hand, is strongly typed. It can be turned into machine code straight away."

Decide for yourself, whether this article is worth your time.



> Decide for yourself, whether this article is worth your time.

Did you even read the article? It goes into a deep dive on AssemblyScript and WASM including discussions on Rust’s std::vec and Go’s slices, bump allocators, TurboFan/Sparkplug/Ignition/Liftoff benchmarks, and -O3 versus -O3s flags and contains links to a pull request to try to help with one of the noticed performance issues.

This is a well-written dive into the technology, writing it off because you don't like the definition of "strongly typed" in this sentence is a bit premature.


WebAssembly IS strongly typed, and that property DOES help it to generate machine code right away. Heck, even its if statements and loops have types associated with them, and those types can help compilation from a stack machine to a register machine. The article even mentions a concrete reason later down, that deopts because a type passed to a function changed can't happen in webassembly like it can in JIT compiled JS.

And indeed, this article does seem to be worth my time.


I think the author just meant their scripting language is strongly typed, but they says wasm because that’s the only target for that language.

I wasn’t confused by that statement when reading the article. Obviously wasm isn’t strongly typed but obviously that’s not literally what the author meant.

The article was interesting and they clearly spent a substantial amount of time creating it.


I have not decided, whether reading your comment was worth its time, so maybe explain what you mean?


He is right. Implying that Webassembly is strongly typed is garbage and tells much about the rest of the content.


Why is that garbage?

Is this maybe something with academic definition of strongly typed?

Because the way I understand Webassembly, it surely is strongly typed.

edit:

"Strongly typed is a concept used to refer to a programming language that enforces strict restrictions on intermixing of values with differing data types."

https://www.techopedia.com/definition/24434/strongly-typed

Seems to back me up.


this is nonsense. WebAssembly is strongly typed.

either you don't understand type systems, or you don't understand WebAssembly. in either case, I can encourage reading the article, because it sheds some light on both topics!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: