10 ms·
What if JavaScript wins?
- captainbland 8y agoI think within a few years WASM will finally be in a place where it becomes usable without relying on JavaScript for interfacing with the web browser and people will be able to develop high-performance, isomorphic web applications in other programming languages. This will definitely start to eat into it as it makes gains elsewhere. As such, I don't really see JavaScript reaching the level of dominance implied in this article - and to be honest, I wouldn't want it to when Oracle has gone after developers for naming it as something they support on trademark grounds. https://www.theregister.co.uk/2018/04/18/oracle_ios_app_takedown_javascript/ https://www.theregister.co.uk/2018/04/18/oracle_ios_app_take... Honestly, I think JavaScript at some point - not in the near future - will see its 'Flash' moment where a large organisation stops supporting it entirely if Oracle keeps up stuff like this.
- abritinthebay 8y ago> it becomes usable [...] for interfacing with the web browser As soon as you add DOM integration... all the things people hate about JS in terms of architecture and compromises will show up in WASM.
- jpfed 8y agoThis is a common sentiment but it certainly doesn't cover "all the things" people hate. I hate dynamic types, I hate imperatively constructing "types" through prototypal inheritance, I hate "this", and none of that has anything to do with the DOM.
- abritinthebay 8y ago> I hate imperatively constructing "types" through prototypal inheritance You hate objects... basically?
- jpfed 8y agoWhile objects are overrated, that's not what I'm talking about here. I didn't say "imperatively constructing objects of a type", I said "imperatively constructing types". This has likely changed since I last used javascript, but in the bad old days, if you wanted to specify a "type" (in the structural sense- a common set of fields that you might construct instances of), you build that type with statements rather than declarations. That feels icky. Also, that means that any potential IDE has to interpret your code (rather than simply parsing declarations) to provide any real support for you, which meant it took forever for IDEs to provide things like autocomplete (let alone foolproof renaming).
- abritinthebay 8y agoLikely you'd like the modern class syntax then. You declaratively specific the "class" (it's just an Object under the hood, it's mostly sugar for prototypes) and then you could just to instanceOf to test if it's your "type". I mean in JS basically everything is an object so if you're constructing a "type" you're constructing an object no matter what.
- danield9tqh 8y agoI think that's fine because WASM isn't meant to write code in. It's just a source language for other compiled languages. I'm assuming the javascript complaints you're talking about are because people actually have to write javascript code?
- captainbland 8y agoEven then I don't think they would tie it to the WASM definition that tightly as they intend it to be used on other platforms than just web browsers. It seems to me that you could just have the DOM be expressed as a kind of interface which the browser implements, and then each language just has a DOM library which exposes that interface to the programmer.
- abritinthebay 8y agoRight, I agree but every time someone talks about tighter integration with the browser it really, under the hood, requires DOM access. Because it does basically everything else (or is spec'd to).
- bitL 8y agoUse JavaScript or its wrappers (TypeScript, Dart etc.) just to glue modules written in C++ or other sane language, compiled into WASM. That's the future. JavaScript's role will be diminishing, paradoxically when it is now becoming an actually usable language, e.g. finally removing callback hell by async/await, adding some "borrowed" stuff from Scala etc.
- anaheim_ducks 8y agoBlazor and similar technologies built on WASM are the future of web dev. http://blog.stevensanderson.com/2018/02/06/blazor-intro/ http://blog.stevensanderson.com/2018/02/06/blazor-intro/ I no longer read articles on JavaScript or related libraries, it's all obsolete. I know enough JS and TypeScript to get by until WASM-based tech takes over, hopefully within 2 years.
- Touche 8y agoGiven the popularity of Node.js, I doubt this. JavaScript is still winning when people have the option to use C# or C++ or Scala or whatever else.
- chadlavi 8y agoAnil!
- chadlavi 8y ago> Finally, there are the networked information sources for news and discussion, primary among them being Hacker News. Though it’s notoriously the most hostile of these large, networked coder communities [...]
- abritinthebay 8y agoI mean... he's not wrong.
- anildash 8y agoBut it's also got nice folks! :D
- abritinthebay 8y agoAbsolutely! But there’s a reason a lot of professionals avoid here and call it The Orange Website in a derogatory fashion... ... and it’s not because it’s overfloeing with kindness & tact.
- kizer 8y agoAll the C derivatives are getting closer to one-another. How different are Typescript, C-sharp, and Java? When JavaScript adds gradual typing, interface, etc. won't all these languages be nearly the same? The runtimes will differ but the language features and syntax will be almost the same.
- Felk 8y agoI'm not sure if this is a good or a bad thing. On one side we might get stuck on a local maximum as all languages stick to the universally established features to be marketable, on the other side it seems that some arguably objectively useful abstractions crystallize, which makes things easier for everyone.
- kizer 8y agoI think (hope) that Academia, or individuals, would still be able to churn out "original" languages if there were no immediate need in industry.
- Joeri 8y agoThe problem is that these features get watered down as they make the jump. There’s a very clear scala > java > php feature pipeline, but features get worse with every leap. The way lambdas work in scala is better than java which is better than php. I wish languages would solve these problems in a way that nicely fits the language, instead of copying the subset of the feature which they can make compatible. Maybe the programming world has become too networked and there’s a lack of original thought when implementing language features.
- Someone1234 8y agoMark my words, Web ASM will be just as opaque as traditional assembly languages. Which is to say that we'll shift the problem from "JavaScript is bad" to "I cannot debug this," "I cannot see what this script does," "I lost the original source code, and now I have to reverse engineer WASM! Help!" WASM isn't a panacea. Much like Flash, Java Applets, and ActiveX it is just the newest in a long line of Magic Blobs™ that supposedly solve all of our problems. Sooner or later it will become so complex that even the prospect of manually reviewing WASM will be seen as more unrealistic than a simple re-write based on input/output conditions.
- kartan 8y ago> manually reviewing WASM You should not write code in WASM. You should not review WASM. In the same way that most Java developers don't have a clue how bytecode works in the JVM.
- kizer 8y agoBut... Java developers should have a clue how bytecode works in the JVM. Otherwise I agree.
- freedomben 8y agoHonest question, why? Surely some would benefit, but the average java dev hacking on a spring app? Not so sure. Would love to hear your thoughts tho
- kizer 8y agoI agree totally that most will do fine without, but the parent comment cited the fact that few devs know about bytecode/jvm to support not knowing wasm. But descriptive statements don't imply prescriptive statements. So just because most have no clue, doesn't make it "right", or able to be used as justification. I wouldn't call myself a Java dev - I mean I know Java like 99% percent of the world does - so I may have a terrible perspective on this anyways. Although knowing the basics of how Java source code -> running process would certainly help any Java dev.
- kartan 8y agoThe missing point is that other languages have bigger/more specialized ecosystems. For the networking effect to exist, your network doesn't needs to be just big. But it needs to be bigger than the rest. That's why people don't leave Facebook. Java, C#, C++, Python have big ecosystems with specialized libraries for enterprise applications, performance, data analytics, etc. If any, Javascript is already decreasing its influence in the web. Unity3D works with C# and it is removing support for its own version of Javascript. Or your choice may be Unreal Engine and C++. Or you can use Emscripten with C++ to build your own solution. JavaScript is a language with a lot of problems. The final blow is going to be WebAssembly, as it will open direct web development to all other languages. JavaScript will stay with us for long. But I don't think that is reaching its peak right now.
- kapv89 8y agoFor me, as a founder of a young startup, the overarching benefit of being proficient in modern JS and sorrounding tooling is that I can use the same language for my whole stack(servers, web, Android, iOS), and spend more time thinking about the product and business. In the possible future where the company grows enough where it needs a distributed server software, the only part of the product that'd be changing would be the backend, and I'd probably look at Java for that. For the rest, React(& react-native) + graphql + a typesystem is a pretty good stack for UI software.
- bitL 8y agoYou literally restrict yourself to one of the worst languages ever designed. What could be solved with elegance and without demoralizing your staff in 5 minutes in some other language, in JavaScript it might require "sailing to Africa and back" to achieve the same (though I must say it has improved a bit recently from the insanity it used to be). On paper it might look good to you, but the reality is very different and you are making yourself seriously restricted in competing with other companies using more sane languages. Not to mention the web stack changes every single year completely, node has scalability and versioning issues, and you end up relying on quickly changing pieces of code you have zero control about.
- mLuby 8y agoOnly demoralizing if your staff haven't updated their knowledge of JS since 2005. :P
- coderzach 8y agoWhat's an example of a "sailing to Africa and back" problem in JavaScript?
- bitL 8y agoEmulating classes hierarchy using prototypes while always keeping on mind what "this" means right here right now at this very call stack/context, without async/await basically any resource loading (unless you use some lib that is hiding nasty pieces from you), no enforced object structure/properties and passing them arbitrarily and then in the next version needing to add/remove some property everywhere, and many more.
- manyoso 8y agoIf a non-typed language wins, then god help us and I fear for the youth :)
- peterbraden 8y agoWhy? Just because a non-typed language is dominant, doesn't mean that typed languages disappear.
- shiado 8y agoI used to hate JS because the language is objectively badly designed, but then I realized that the merits of the language provide a glimpse of the future of programming. Most programming problems people have are highly generic, often looking to implement something completely off the shelf as far as problems go. Wheels can only be reinvented so many times in so many ways. To me the JS ecosystem offers a level of high level programming that you just don't get in other languages. Nothing comes close. There is a package for every possible problem you have just waiting to be used. You wan't some complicated auth feature? Consider it done with one require statement and calling a function to set a configuration. You want some reusable components for your frontend to solve some complicated issue? Somebody has a crazy React package doing exactly what you need. Obviously there are security concerns with this but that is a totally separate topic. In the future programmers won't be replaced by robots, they will be replaced by import statements.
- nomy99 8y ago"In the future programmers won't be replaced by robots, they will be replaced by import statements." I disagree. How is this different from someone 20 years ago saying programmers will be replaced by jar files.
- andrewmcwatters 8y agoYeah, the reality is some of us got replaced by Adobe and Salesforce.
- nomy99 8y agoSo you are saying you couldn't apply your skills as a java developer anymore because of salesforce?
- ourmandave 8y agoEven if it does come down to just import statements they'll still be plenty of jobs. Since the deploy tools are rewritten or replaced every couple months somebody has to maintain the build process.
- throwpoiu09 8y agoTo put things in perspective, every decade there is an uber popular so called simple but highly inadequate non-type checked language that is taking over the world of novice developers. It's a social phenomenon. Started with Basic, JavaScript is the latest incarnation. By the same token, there is also one overcomplicated yet unavoidable professional language. In that sense, Scala these days has a proud lineage of C++ and PL/I. And one Lisp leader per decade for humans who not only perceive human-oriented syntax as an apostasy and a personal affront but expect that Borg of parentheses will win any moment now. Hi, Closure.
- TomK32 8y agothe border between non-type and type check languages is getting diffuse these days with typescript going one way and C++ the other way http://en.cppreference.com/w/cpp/language/auto http://en.cppreference.com/w/cpp/language/auto
- Felk 8y agoType deduction is very different from dynamic typing. It's still perfectly safe static typing. A better example would be C#'s "dynamic" type. I can agree with typescript though.
- BWStearns 8y agoxkcd for everything: https://xkcd.com/297/ https://xkcd.com/297/
- _pdp_ 8y agoYou are completely missing the point here. It is not the question if JavaScripts wins - humans are not great at writing software to begin with regardless of the language. Soon, machine-learning assisted programming will be a thing and JavaScript will be a non-issue - applicable to any other language for that matter.
- hprotagonist 8y agoAnd somewhere, Gary Bernhardt is shaking his head in disbelief. https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death... was supposed to be satire... but "asm everything" might actually kind of happen.
- anildash 8y agoYeah, I definitely thought of Gary when I was writing the piece. The first time as tragedy, the second time as farce!
- deleted 8y ago[deleted]
- nawgszy 8y agoI am amused by a lot of the hyperbole used against JS, as if it somehow is hard to use or drastically restricts the problems you can solve. At this point, I'm not even sure if a single comment in this thread that poses itself as obviously anti-JS has a valid knock on the language, just high-level, hand-wavy reasoning about why it is so poor.
- kazinator 8y ago> first-ever truly dominant programming language? ... after Visual Basic.