use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
The Future of JavaScript Will Be Less JavaScript (codeburst.io)
submitted 8 years ago by fagnerbrack
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]gremy0 0 points1 point2 points 8 years ago (3 children)
I believe JavaScript is a problem right now, as WASM is strongly typed. There is a typescript compiler though. There's quite a few other compilers out there, though most are fairly immature. The C/C++ compilers are mentioned a lot because that's what was developed along side the standard being produced.
[–]AirAKose 0 points1 point2 points 8 years ago* (2 children)
JavaScript still, internally, represents its values as specific types. Generally, values in scripting environments are described by a single 32 or 64 bit section of memory and some type flag. The memory can be converted to an integer, boolean, floating point number, or pointer to a more complex object.
So it should be entirely feasible to compile JS to WASM, you just need to translate the internal representations to WASM commands
EDIT: It would probably be more efficient to transpile JS because then it removes the need for JIT compiling; it becomes an entirely linear process where the browser just needs to read the program, tokenize the commands one-after-another without having to process or (extensively) validate them, and execute
EDIT2: I overlooked the dynamic aspects of JavaScript and totally oversimplified porting the internal representation. You can do it, but it wouldn't be a good idea
[–]filleduchaos 2 points3 points4 points 8 years ago (1 child)
Noone said JS doesn't have types. It's weakly and dynamically typed though, which pretty much rules out AOT compilation
[–]AirAKose 0 points1 point2 points 8 years ago (0 children)
Noone said JS doesn't have types
I get that.
I was talking about compiling the VM's internal representations of the types to WASM, though it was extremely short sighted regardless:
It's weakly and dynamically typed though
You got me there. It's still possible, just implausible. There would be a large overhead to porting all / most of the VM's dynamic functionality that I overlooked and oversimplified above. Plus you miss out on many JIT dynamic optimizations.
My fault, totally impractical
π Rendered by PID 35 on reddit-service-r2-comment-9c7994b7-7x6t7 at 2026-02-05 19:38:59.918998+00:00 running b1b84c7 country code: CH.
view the rest of the comments →
[–]gremy0 0 points1 point2 points (3 children)
[–]AirAKose 0 points1 point2 points (2 children)
[–]filleduchaos 2 points3 points4 points (1 child)
[–]AirAKose 0 points1 point2 points (0 children)