5 ms·
oh bloody hell...is this an elaborate troll? I get it...javascript is the universal language. It's also universally hard to fully understand, hard to scale to
by saosebastiao 10y ago
oh bloody hell...is this an elaborate troll?
I get it...javascript is the universal language. It's also universally hard to fully understand, hard to scale to large codebases, has no shared memory parallelism, has a GC-heavy runtime, and is extremely hard to optimize for performance (both by humans and by compiler optimizers).
I appreciate what React has done, it's pretty impressive. But I can't help but think we're getting into parody territory here.
- moondev 10y agoWhy does it matter in the least that its js? That's the beauty of react. It abstracts the ui from the renderer. Its the reason cool things like this can be built. I for one enjoy being able to build interfaces on a common platform for a multitude of application types.
- shawn-butler 10y agoHype
- stcredzero 10y agoYou seem to be implying that you have very excellent cross-platform reuse of code. Please tell me more.
- nkristoffersen 10y agoEven better, a unified skill set in the developer pool. Which is very valuable and productive.
- stcredzero 10y agoIs this really that valuable? Java and C++ had both provided this to some extent before. Rather, I think the majority of the power in Javascript tools comes from distribution. The distribution to both potential users and potential developers is unmatched, and those trump any technical deficiency in the language. I think if programming language designers should have learned anything in the past 50 years, it should be, "It's the distribution!"
- headcanon 10y agoSounds to me like you saw some jquery spaghetti 10 years ago, threw up your hands, and said "Never Again!" Seriously, its a lot better now, and if there's a thing you don't like about it (like static typing maybe?) there's something for you out there (typescript, clojurescript, elm, etc...)
- saosebastiao 10y agoI use React, and I use it with Typescript. So far it is the only thing I've found to be remotely tolerable for the web. There are better languages out there (I'd love to use scalajs), but even the best of them have noticable additional runtime overhead over the already ridiculous runtime overhead of javascript, and some of them go far beyond noticable. Maybe someday this will be better with WASM, but it's not there today. Javascript runtimes work fine (not perfect, but passable) for page-based and widget-based UIs. There's no way I would touch it for something as computation-intensive as real-time 3D modeling.
- headcanon 10y agoI'd imagine that this, like all the other 3D JS libraries, use WebGL under the hood, which is quite fast, hardware accelerated, and just exposes a JS API. You wouldn't actually write your shader in JS, unless it happened to be asm.js which allows the browser to get close to C level performance.
- iLoch 10y agoI don't think the other subcomments actually address your concerns, so here's my take: Javascript is the language known by every web developer. Right there, they're opening up their developer audience to a much larger group of people than is possible with C++ or even C#. "Hard to scale large codebases" isn't really an argument, large code bases are hard in every language, JS isn't really an exception here. Low level stuff (GC, perf, memory) has been, and will continue to be a problem for Javascript. You can mitigate a lot of the problems with well designed code. React attempts to minimize a lot of those problems with solutions that work for most general use cases (and now with Fiber, we're getting even more granular control.) Until React moves to Web Assembly you're always going to have overhead when using JS. But let me know when you've got a solution for VR in a web browser that's not JS and I'll give it a try.
- saosebastiao 10y agoAll of your comments are fair, although I'd dispute that some codebases are much harder to scale than others (x64 Assembly most definitely begs to differ), and javscript is most definitely one of the worst of the general purpose languages. But even then, as far as realistically cross-platform languages go, javascript is actually one of the best (wow). I happen to think though that the web is an obvious use case for the React model, and phone UIs are only slightly less obvious low hanging fruit that has worked out really well. The scalability of the model, however, depends on how much workload you can offload into the React system, and with VR, there is only so much you can do. Even if React is handling all of the rendering with extremely efficient native code, you still have to have a your own full 3d timespace model with realtime response demands. Maybe it will work for extremely basic use cases, but at some point having a familiar language becomes a relatively tiny benefit when compared to an efficient runtime.
- deleted 10y ago[deleted]
- yarper 10y ago> Right there, they're opening up their developer audience to a much larger group of people than is possible with C++ or even C#. Maybe this is true, but I'd hazard a guess that most developers are not web developers. [1] Most of us aren't questioning how VR can be done in a browser, but stopping to ask why. [1]: http://githut.info/ http://githut.info/