[SOLVED] How did we end up with the mess called JavaScript?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How did we end up with the mess called JavaScript?
Does anyone know how we ended up with the hellish JavaScript when we had before FOX-toolkit, FXRuby and TCL? They're POSIX compliant and best of all, actually makes sense without losing context between html and js.
What is the context of your question? That is, how have you first encountered Javascript?
The history of Javascript is probably not relevant to your use, but you may be interested to see where this article leads you. What we know as Javascript is actually a superset of ECMAScript, and the current version as far as I am aware is ECMAScript-6.
I was not a fan of Javascript until recently, but I have come to like ECMAScript-6 even though my use of it is not broad.
Javascript (aka ECMAScript) is used primarily as the scripting language within web browsers. As you have compared it to FOX-Toolkit, FXRuby which is built on FOX-Toolkit, and TCL, I would guess you have encountered Javascript in a non-browser Node.js development environment (of which I am not a fan as yet). A description of your use case would help others provide more useful replies.
Last edited by astrogeek; 11-16-2023 at 03:46 PM.
Reason: superset + typo
The history of JavaScript is extremely well-known. The fact the it was made in ten days (for Netscape) is obviously a factor here.
You claim that those other languages are "POSIX-compliant". Are they? And how would that be relevant, considering that a web browser is not a POSIX-compliant platform?
[...]As you have compared it to FOX-Toolkit, FXRuby which is built on FOX-Toolkit, and TCL, I would guess you have encountered Javascript in a non-browser Node.js development environment[...]
I don't know about the first two,
but I remember that tcl was an early candidate for web page scripting,
inside the browser,
as early as late 90's.
The "novel idea" of JavaScript was "prototypes." This gave an interpreted language great power at nominal cost – and "cost" was extremely important then. But it also made actual runtime behavior extremely runtime dependent ... which you see every day with so-called "ad blockers." You actually do not know, can be made unable to detect, and cannot change what the running code is actually doing on a particular computer.
It continues to baffle me why "JavaScript" won the race ... or, continues to do so. The various strange things that have been done to it, such as "just-in time machine code compiling which occurs on the client machine," continue to leave me shaking my head. "Why would any engineer ... engineer this?" And then, pour so much additional effort into it instead of replacing it?
By comparison, the truly p-compiled "Adobe Flash" was oh, so elegant. Where did "WASM" go?
Last edited by sundialsvcs; 11-22-2023 at 10:14 AM.
WebAssembly? It didn't go anywhere. It's widely used.
Excellent. I'd lost touch with it lately.
However, it still mystifies me that people have poured effort into "just-in-time client-side compilers for JavaScript," when the obvious answer is and always has been to supply object code to the client rather than source. And, that "object code" could be anything that the situation required.
Likewise, why do we continue to build the back end of "web sites" using interpreted languages like PHP, Perl, Python, Ruby, and so-on? Why don't we just supply executable programs for the servers to run? The "at-run-time decisions" made by all of those interpreters, millions of times per second, do not change.
Last edited by sundialsvcs; 11-28-2023 at 07:42 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.