7 ms·
Imagine if time travel was possible and we could go back in time and avoid this :-)
by giamma 3y ago
Imagine if time travel was possible and we could go back in time and avoid this :-)
- erokar 3y ago... and we could all be writing Java applets today.
- tralarpa 3y agoNo, no, Java is old and slow. Let's compile typescript to javascript, write the user interface in React and HTML (with some parts hidden in CSS files with some selector and expression magic to make it more fun), and WebAssembly for the performance critical stuff. Easy-peasy.
- chrisandchris 3y agoYou forgot the small configuration file required with Webpack 4 just to bundle your stuff. It's a close call to being a bit smaller than the bible.
- tralarpa 3y agoWhy would you not want to make your application's build process dependent on a dozen plugins that will no longer be compatible with each other in the next version? Are you even a real programmer? /s
- pavlov 3y agoIf Netscape hadn’t introduced and managed to establish their scripting language before Microsoft steamrolled them, then the standard language on the web would be Microsoft’s contemporary alternative which was VBScript — in other words, BASIC. Be careful what you ask for.
- yen223 3y agoYeah, people here seem to forget that Javascript had actual competition in the browser space back in the day. It was very likely the winning browser-side language would have been a proprietary one, which isn't the world I want to live in.
- unscaled 3y agoWhile I very much wouldn't want to live in this world too, I'm pretty sure VBScript was an answer to JavaScript. Internet Explorer 3.0 implemented both VBScript and JScript (Microsoft's slightly incompatible version of JavaScript) at the same time. Microsoft of the 1990s seemed to never be able to decide whether they want to follow "Embrace, Extend and Extinguish" or NIH, so they usually both implemented slightly-incompatible versions of popular technologies, and then shoved in their own in-house technologies alongside. That's how you got both ActiveX Controls and Java Applets (both sucked). That's how you got both Visual J++ and Visual Basic (J++ was superior), and later both J# and C# (this time C# was superior, but could you expect anything less from Anders Hejlsberg?). That's how you got both VBScript and JScript running on JScript (a little know fact that made it possible for me to script Windows 2000 machines without running through a decade's supply of vomit bags). If there was no JavaScript, I think Microsoft would have gone with something like ActiveX, instead of rushing to deliver their own a quick and dirty implementation of a scripting language. But we wouldn't get an almost-decent scripting language embedded in every windows machine, and I would have had to automate all these machines using BATCH files!
- dgb23 3y agoImagine how much complexity, churn, standards etc. we could have avoided if they put a Scheme in Netscape (like they initially wanted). - language features like module loading, async, classes arrow functions etc. would be unnecessary or trivially implementable within the language - libraries like React et al would be much simpler - plenty of FP libraries would be either unnecessary or much simpler - things like "hot reloading" during dev time would be much simpler and actually work out of the box - simpler parsing and more cross pollination in terms of runtime performance - type annotations could be implemented trivially in user space, the runtime could evolve into respecting them for performance gains - tooling complexity would be much reduced because of all of the above
- deleted 3y ago[deleted]
- krapp 3y agoI know it's the fashion on HN to hate Javascript but it opened the gateway for programming to generations of people and made the web substantially more fun and useful in many ways. It's not Javascript's fault the language was ruined by SV and survellance capitalism.
- giamma 3y agoI think that the way we build user interfaces today on the Web is fundamentally flawed. One need to learn JavaScript/TypeScript, then HTML and DOM, then CSS. Then most likely you need to learn Angular or React or Vue or whatever, some widget toolkit like Bootstrap, get accustomed with Webpack, minification, uglification, rely on countless MIT-licensed libraries whose authors may come and go because the base runtime (=the browser) just gives you DOM, CSS and plain JavaScript. Did you ever tried implementing a desktop UI using an object-oriented multi-platform toolkit like SWT or QT or GTK? There are good chances that all the dependencies you will need are already "there", you learn the widget toolkit bindings for your preferred programming language and you can start. It's so much more productive and fun (at least for me) and most of the time you don't need to mess up with colors, styles etc. etc. because you will want the operating system to take care of that. On the Web you have so much more freedom, because the web page is almost a canvas, but at the same time (for me at least) it looks way less productive and everytime I think of it, I always wonder why nobody is proposing anything better for the Web and the industry keeps on building layers of complexity on top of JavaScript/DOM/CSS.
- cxr 3y ago> Then most likely you need to learn Angular or React or [...] For a very loose definition of "need". > Did you ever tried implementing a desktop UI using an object-oriented multi-platform toolkit like SWT or QT or GTK? There's an abundance of desktop application code written in JS from the GTK+ folks themselves. They embraced SpiderMonkey (the Mozilla JS engine) years ago and have been shipping stuff on it for just as long. Anyone who has booted into the default desktop on Ubuntu—or any other installation running Gnome—has already come in contact with it, perhaps even today. That doesn't get a lot of attention, though, because it's not "squeaky": it isn't plagued by the same problems that people (stupidly) associate with "JavaScript" despite the fact that what they're really thinking of are problems with the NodeJS/NPM community in particular and its spectacular tooling + other webdev-oriented accomplishments. I.e., all the things it insists are requirements for the Modern Programmer—a mission which their detractors assist them on by perpetuating the story themselves (cf "need")...
- intelVISA 3y agoDeath of SWE: 1995. Nobody could've known how bad things would become after Js was inflicted on the world... right?
- cmrdporcupine 3y agoNah, if I were to go back in time I'd just push them to clean it up a bit before launch. In the end, JS has been a net good for the industry. I don't work in it, but it's turned into something decent over the years though the frameworks around it are insane. But it took 15 years to get to this place and become a "grown up" tool, imho partially because of some odd choices early on. Scoping: Especially initially, the scoping rules were really wonky. OO: I am actually a fan of prototype inheritance (Self & LambdaMOO FTW) but the form implemented in JS was confusing for most people and they never understood it, esp given Java was ascendant at the time with its very strict and boring class-based model. I think some clarity was needed here. Lack of standardization around how to do objects, inheritance, encapsulation led to a total bizarre mixture of approaches and misunderstandings. Essentially I just think having it passed over by some more sober minded language designer types who had research background in e.g. Scheme, Lisp, Self, etc. would have been good. Going all in on JS instead of wasting time with the ill-fated Java applet stuff would have been good for the industry. It's what the industry ended up doing eventually anyways, but it took until the 2000s before this really clicked for people and they finally gave up on the various half-baked dynamic plugin solutions (Flash, ActiveX, Java applets, etc). The "Java" in the name was/is a problem and led to a decade of stupidity. I understand how it happened, but it shouldn't of.
- cxr 3y ago> Lack of standardization around how to do objects, inheritance, encapsulation led to a total bizarre mixture of approaches and misunderstandings. That void never really existed. There was the right way to do it, basically the same way that ES6's class syntax actually works today, and then there were a bunch of people fooling themselves into believing that the impedance mismatch that resulted from writing code against their own derpy metaprogramming system they'd devised themselves was acceptable. The attitudes associated with that mindset never really went away—it's what drives the demand for stuff like Webpack, along with NodeJS's CommonJS-inspired approach to modularization infecting everything and the README for create-react-app providing list of steps to get someone up and running requiring them to download half a gigabyte of packages to their disk before they can successfully complete the Hello, World exercise, not to mention the abstraction (and resulting boondoggle) that is React itself.
- smarks 3y agoEverybody kills JavaScript on their first trip.
- hoofhearted 3y agoThis could have been a great plot for the Terminator movies lol.
- panick21_ 3y agoSun had Self that was already incredibly fast. Instead of suffering threw 10+ years of terrible performance, we could have had a fast language back then.