<story><title>WebAssembly is easy – a hello world example</title><url>https://fodor.org/blog/webassembly-hello-world/</url></story><parent_chain></parent_chain><comment><author>_hardwaregeek</author><text>This reminds me of the classic owl meme. Draw two circles, then draw the rest of the damn owl. Writing a hello world does not make WebAssembly easy. I can write a hello world in Rust or in Haskell trivially. That doesn&amp;#x27;t mean I understand borrow checking or monads. Besides the author doesn&amp;#x27;t even go over printing hello world.&lt;p&gt;In fact there&amp;#x27;s quite a lot that&amp;#x27;s inaccurate with this short article. WebAssembly is not really close to Assembly. It offers quite a lot more structure, including control flow and even a concept of functions with types. Also refactoring performance critical code in WebAssembly is not the greatest idea since there&amp;#x27;s a massive interop overhead. Not to mention hand writing WASM is incredibly tedious.</text></comment>
<story><title>WebAssembly is easy – a hello world example</title><url>https://fodor.org/blog/webassembly-hello-world/</url></story><parent_chain></parent_chain><comment><author>Eikon</author><text>&amp;gt; Now that you know how you can easily create and use WebAssembly code, there is nothing stopping you from refactoring performance critical parts of your code using WASM.&lt;p&gt;There is, writing WASM by hand will not only create an unmanageable mess but also should be strongly discouraged, WASM is supposed to be a target not a “language” like the author is mentioning.&lt;p&gt;Also, it’s doubtful WASM is actually faster than plain JavaScript for most use cases when not speaking of benchmark-optimized tests. It’s not the point of WASM.&lt;p&gt;Unfortunately, the way I see it is the ASM part in WASM is going to create a disaster where people really believe it’s an analog to physical machine code.&lt;p&gt;Even speaking of proper assembly code, it’s not advisable to write it by hand except in very rare and specific scenarios such as cryptography as it’s most of the time going to be slower than using an optimizing compiler anyway.</text></comment>