Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
With WebAssembly the landscape will change. React will be written in something other than JavaScript, like typescript or Rust!
-
inaba46316yDev dependencies, non-transpiled source code, docs, etc etc.
Then there's also the fact that for you java project you're most likely going to use already compiled files and such
TL;DR, your comparison is silly -
@inaba
After finally having some sleep, I agree, it's silly.
It's just that I had to move some sources to different location and copying 15k files takes quite some time.
I was just sleepy and angry -
@AlgoRythm No it's not, most use cases target JavaScript for compilation. Typescript has certain guarantees (being strongly typed) that allow it to be compiled to something like WebAssembly.
-
@AlgoRythm although it's not viable right now because there is no garbage collection support in WebAssembly.
-
@AlgoRythm it's extremely similar to JavaScript but it has a type system. You wouldn't say C++ *is* C ☺️
-
@AlgoRythm it's not JavaScript because JavaScript has no type system. What's so hard to understand about that?
-
@beegC0de TS compiles DIRECTLY into JS. It's more of a JS macro system than anything.
-
@AlgoRythm well by that definition, C++ is assembly. And no, a type system isn't macros.
-
@beegC0de
1) c++ represents assembly, yes. That's why programming languages were created, if you didn't know.
2) here's the "type system" you love, but in JavaScript (Where it's actually implemented) -
@AlgoRythm I'm not denying that the typescript you wrote was compiled to JavaScript, but type correctness is enforced at compile time, not runtime.
-
@beegC0de IT IS RUN IN AN INTERPRETED LANGUAGE. THIS WAS YOUR OGIGINAL ARGUMENT.
You must just be trolling me at this point. -
@AlgoRythm what? You replied to my original reply with the implication that JavaScript could be compiled to web assembly because typescript and JavaScript according to you. I'm saying no they're not, the type information and sized types are needed to be able to compile to web assembly. Once it's compiled to JavaScript, that information is gone.
-
inaba46316y@beegC0de It very well can actually. Just because it isn't strongly typed doesn't mean it can't.
In fact, in V8 JS is already build into machine code using a Just in time compiler that does a bunch of magical stuff for optimization. There isn't really any reason it shouldn't be possible with WASM -
@inaba but you do need sized types for reserving stack space BEFORE runtime. I'm not sure how much V8 or spidermonkey optimize this after each stage, but webassembly is just bytecode and all that dynamic jazz doesn't happen at runtime. Doesn't have much to do with sized types but it does avoid the allocation hit for a lot of code that otherwise wouldn't (JavaScript code)
-
inaba46316y@beegC0de V8 I know optimizes the hell out of of the bytecode that it generates, and even moreso the second time you run something. And JS does have types, it's just very loose about them and it's made so that you don't really have to worry that much about them because, tbh, the computer knows what it's doing (and so do you hopefully)
https://medium.com/dailyjs/... -
@inaba I definitely won't disagree with you that V8's optimization piperine is fantastic, but interpreting takes up a lot of time. To be able to link webassembly (optimized before hand) is a big win in that area as there is no interpreting other than fetch, execute etc etc.
Related Rants
Really???
My whole finished Java project with database & gui - 277 files in source
Simple JS project nodejs & react - 15k files???
What the fuck?
I tried to like JS, but maybe later... Someday...
rant
js
wtf
javascript
java