Earlier quoted context omitted.
I don't so much think of them as flaws... the first use case was form validation, and most of the fuzzy type coercion makes a ton of sense through that lens, where ''. 0, etc. coercion to falsy is easy for dealing with user input. It's also why it's one of my favorite options for ETL workloads. It's just a matter of understanding the langauge. That said, it's been my favorite language since well before the "good part…
I use JS every day; I would say I like it. I would even say that in 2020, if you know what you're doing, it's a pretty good language on the whole. But I don't think it's controversial to say that the following were objectively bad decisions (in hindsight, of course, but still): - Automatic casting behavior between the core types (you're the only person I've ever heard suggest that this might be a good thing) - Automa…
Netscape and Sun Announce JavaScript (1995)
421–430 of 476 posts
Re: Netscape and Sun Announce JavaScript (1995)
#422I recall being at a local (Detroit) IT seminar around the time Javascript was announced, and some guy from Sun with an English accent going on and on about how safe javascript would be, since it couldn't access local resources and they had purposefully left out a lot of functions that could compromise the user. It's changed a bit since then, I'd say.
I think people will probably hear that and think poorly of today's more permissive JS, but it's worth mentioning that there wasn't much of a browser security model at that time. Browsers/pages weren't sandboxed, and there was no concept of "Allow site to do X?" like we have now.
This lead to some iffy things with even early JS, such as allowing sites to set the user's homepage just by clicking a link.
Re: Netscape and Sun Announce JavaScript (1995)
#423Earlier quoted context omitted.
This is all semantics, but the idea was that Java is a "real" language for serious use and JavaScript is a "script" that's much easier to use and doesn't involve all the complications of a "real" programming language. It was only kind of true back then, and not even remotely true now. There really isn't a solid line you can draw between a "script" and a "programming language". To me, something like Python is right in…
To me, if something acts logically like it is run from top to bottom, it's a scripting language. Python scripts and JavaScript are in this category; Java isn't. Additionally, explicit compilation/linking/assembly shouldn't be required for a scripting language, even if the interpreter does stuff kind of like this behind the scenes for performance.
Keep in mind that if you're implementing a branch predictor in HW, most CPUs will already be speculatively pre-running all sorts of code speculatively. Most of the current gen static analyzers/compilers linearize into basic blocks and run graph theoretic peephole compiler optimization passes, but that certainly isn't the only way to do to it. I guess with the future of hardware heterogeneous this is why data-flow or even more hybrid type of computer architectures are hot instead of mostly control flow-types of checks.
Re: Netscape and Sun Announce JavaScript (1995)
#424Earlier quoted context omitted.
You can't just put `putStrLn "Hello"` in the top level of a Haskell program and expect it to work. You can do it in a REPL, but that's besides the point.
Sure. I was responding to this: “To me, if something acts logically like it is run from top to bottom, it's a scripting language.” I don’t see them as scripting languages, but that definition would include them.
Example, consider this mutually recursive definition at the top level:
a = 1:b
b = 2:a
It doesn't, by any means logical or not, look like it runs from top to bottom. If so, the first line would have immediately been an error because `b` is an undefined name.Re: Netscape and Sun Announce JavaScript (1995)
#425Earlier quoted context omitted.
Sun seemed to have a real mental block when it came to applets - people screamed at them for years about performance and they refused to do anything about it. Indeed, in 1995 the simpliest applet would take several seconds to appear. In 2005 (about the time everyone stopped caring), the same applet would take ... several seconds to appear. They never got faster even as CPUs improved by several hundred percent. The Ap…
This was deliberate - they were afraid Java would become too popular on the browser side and people would stop buying their heavyweight servers. They always pushed Java as the server side language. If they wanted Java at the client side - they wanted pure Java clients (webstart, etc) not browsers hosting Java applets. Browsers hosting Java applets were sneered upon. JS eventually won the game here after IE advanced W…
Not so distant to J2ME browsers like Opera Mini, and today with Android I am not sure. Chrome is C++, but on Android everything gets blurred.
Re: Netscape and Sun Announce JavaScript (1995)
#426Re: Netscape and Sun Announce JavaScript (1995)
#427Earlier quoted context omitted.
Sorry I am not an expert in Java, but doesn’t the jvm execute the .class files like bash would execute the .sh scripts.
A scripting language is generally thought as a language suitable for quick easy project, less so for large scale software engineering. Verbosity of syntax, compilation, presence of boilerplate code, static typing are all things that make java unattractive as a scripting language. Java is great at what it does, which is not scripting.
Re: Netscape and Sun Announce JavaScript (1995)
#428Earlier quoted context omitted.
Flash is better than JS to be honest. JS still hasn't caught up with ActionScript. The only bad part about Flash is that it's proprietary.
When flash was focused, my keyboard shortcuts didn't work. I hated it just for that.
Re: Netscape and Sun Announce JavaScript (1995)
#429Earlier quoted context omitted.
Yes for sure..I worked as a corporate contractor for AT&T in 1990's and I was doing client/server apps using MSVC++ that are basically identical to React-type wideweb dev... Indeed, your absolutely correct in saying it was obvious where webapps had to go, and that HTML and CSS just wasn't going to get us there.
Nitpick: "...and that HTML just wasn't going to get us there" (CSS came out in 1996).