15

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...

Comments
  • 1
    With WebAssembly the landscape will change. React will be written in something other than JavaScript, like typescript or Rust!
  • 7
    @beegC0de something other than JavaScript... Like typescript?!?!?!?

    Dude...
  • 3
    Minified, one line.

    One really long line
  • 4
    Dev 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
  • 0
    @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
  • 0
    @AlgoRythm JavaScript isn't strongly typed and can't be compiled to web assembly
  • 0
    @beegC0de Typescript is JavaScript.
  • 0
    @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.
  • 0
    @AlgoRythm although it's not viable right now because there is no garbage collection support in WebAssembly.
  • 0
    @beegC0de Don't fucking try to convince me Typescript isn't JavaScript
  • 0
  • 0
    @AlgoRythm it's extremely similar to JavaScript but it has a type system. You wouldn't say C++ *is* C ☺️
  • 0
    @beegC0de just... Sigh...
  • 0
    @AlgoRythm it's not JavaScript because JavaScript has no type system. What's so hard to understand about that?
  • 0
    @beegC0de TS compiles DIRECTLY into JS. It's more of a JS macro system than anything.
  • 0
    @beegC0de c++ doesn't compile into c, it compiles into assembly
  • 0
    @AlgoRythm well by that definition, C++ is assembly. And no, a type system isn't macros.
  • 0
    @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)
  • 0
    @AlgoRythm I'm not denying that the typescript you wrote was compiled to JavaScript, but type correctness is enforced at compile time, not runtime.
  • 0
    @beegC0de IT IS RUN IN AN INTERPRETED LANGUAGE. THIS WAS YOUR OGIGINAL ARGUMENT.

    You must just be trolling me at this point.
  • 0
    @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.
  • 0
    @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
  • 0
    @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)
  • 1
    @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/...
  • 0
    @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.
Add Comment