r/ProgrammingLanguages • u/[deleted] • Dec 27 '22
General Request to all Programming Language designers
It's usefull to be able to play in the browser for example nodejs webcontainer has been very welcomed Introducing WebContainers: Run Node.js natively in your browser (stackblitz.com)
Setting up nodejs locally is a pain in the ass all the more for new programming language. So would be great if you think about having a wasm version for the browser.
0
Upvotes
4
u/cxzuk Dec 27 '22
Hi Lepinek,
From a project management perspective, I agree with you. Considering how to deliver the compiler toolkit and make it accessible in its early stages is really important, and I believe that web+wasm is an interesting proposition.
A word of caution however. From my experiments, WASM isn't quite ready for mainstream. The number of languages to fully support WASM output is quite low and restrictive.
One of these restrictions is with interacting with the DOM. The most reliable way I've come to see is having the wasm part just be a library that the HTML+JS calls. But this is also challenging because a HTML editor is really difficult to get working correctly.
The alternative is to use a canvas/GL to draw the interface - which is a considerable amount of work.
Kind regards,
M ✌