From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

No "criticism" section?[edit]

Your language is bad and you should feel bad. (talk) 17:01, 27 July 2017 (UTC)

Agreed. IMO Javascript is the worst thing to happen to web/html EVER, a relic of the Word macrovirus era when every two-bit application had its own totally overpowered scripting language. The security issues mentioned are just the top of the iceberg, in addition comes the sheer annoyances, resource wastage and privacy issues JS enables. In most cases JS is nothing but techno-masturbation and complexity for complexity's own sake, implemented by developers primarily interested in protecting their own jobs, similar to how web pages constantly demands the newest browser to work while not having showed any tangible improvements in the last 10-15 years. It's a bit like if every book was a pop-up book (complete with animated elements, flashing lights and greeting-card style sound chips), it's time for developers to realize most web pages are documents and not applications, and shouldn't behave as such. — Preceding unsigned comment added by (talk) 04:45, 6 March 2019 (UTC)
It is a fact that web-browsers, had practically became virtual machines doing all the work, with JavaScript playing the role of a systems programming language. The many unnecessary bells and whistles that cause the browsers to stall. That is not necessarily caused by malicious programmers, the few that I had learned about JavaScript point it as a very unsafe language, because it promote bad programming habits.
Although I agree with you in many points, this discussion page is not to talk about bad design of JavaScript. It is to discus on how to improve the article.
I suggest you to turn all your observations into a draft criticism section. They are valid and I support to include a reasoned criticism. It is a big challenge, because it is a highly passionate subject among programmers. — Preceding unsigned comment added by (talk) 11:34, 25 December 2019 (UTC)

Vendor-specific extensions is outdated as of Jan 2018[edit]

The vendor-specific extensions section was originally written around 2009 or so, and it's badly out of date.

Some of the features mentioned, such as the let statement, have been moved directly into ECMAScript and thus are no longer vendor-specific. Other features, such as the iterator protocol, although not directly migrated into ECMAScript, have inspired alternatives in ECMAScript. And yet others, such as array comprehensions and generator expressions, are now being removed from Mozilla's JS engine ala E4X.

Unfortunately, I'm not as well-versed with JS nowadays, so I can't update this section with absolute certainty myself.

--Maian (talk) 03:40, 22 January 2018 (UTC)

Semi-protected edit request on 6 June 2018[edit]

2409:4064:38B:C2A:0:0:2024:70A4 (talk) 15:26, 6 June 2018 (UTC)
 Not done: The request is empty. Sam Sailor 15:37, 6 June 2018 (UTC)

Security section (renamed?)[edit]

I saw that the redirect Criticism of JavaScript was directed to section 'Criticisms' which seems no longer to exist. I imagine it was renamed to 'Security', judging by the subsection titles, and I have changed it to redirect there. I would have added a courtesy comment per WP:RSECT but am not able to do that as the page is protected. (talk) 10:36, 12 June 2018 (UTC)

Bold claims[edit]

What is the meaning of this claim?

JSON, or JavaScript Object Notation, is a general-purpose data interchange format that is defined as a subset of JavaScript's object literal syntax. Like much of JavaScript (regexps and anonymous functions as 1st class elements, closures, flexible classes, 'use strict'), JSON, except for replacing Perl's key-value operator '=>' by an RFC 822[120] inspired ':', is syntactically pure Perl.
I've removed it. Even if it's true, why mention it? If a comparison with Perl is to be made, it should be done elsewhere in the article. Rp (talk) 16:33, 20 May 2019 (UTC)

More bold claims[edit]

Oh, I think I have another one: how the hell is JavaScript influenced by Scheme? It's not an expression-oriented programming language, there are no continuations, mutation is heavily encouraged and macros and regular syntax are also no-shows. — Preceding unsigned comment added by (talk) 08:28, 22 March 2019 (UTC)

In how many Netscape Navigator releases was JavaScript called LiveScript?[edit]

Right now there is the following text in the article:

the language was officially called LiveScript when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995

Here are the release notes for Netscape Navigator. As you can see, in 2.0b1 it was indeed called LiveScript, but in 2.0b2 it was already JavaScript. So if it was actually only one release, I think this needs to be changed.

--MaGIc2laNTern (talk) 20:45, 25 March 2019 (UTC)

Javascript design in ten days source needed[edit]

Hello, can't find my credentials to logged in, but here is a source that shows that Javascript design (not the implementation) was rushed in ten days. — Preceding unsigned comment added by (talk) 09:33, 26 September 2019 (UTC)

The importance of Babel (or alternatives) to evolution of JS.[edit]

Hi folks, I'm not the right person to actually add content here, but upon reading the article, it seemed to leave out what has allowed JavaScript to evolve - that is the existence of JavaScript compilers (is that the right word) like Babel. My understanding is as follows:

  • Developers will never use a feature of a language that isn't supported by most browsers. This would, automatically, include any 'new' feature of a language like all those introduced in ES5, 6, 7 and 8.
  • Because of this web page developers were required to use the most primitive version of JavaScript supported by the browsers they were targeting.
  • Because of the existence of JS compilers like Babel, folks developing new ideas for JS can implement those features and make them available to anyone who wants to try them out, without any dependencies on browser adoption. This is because the JS compiler can, before the code leaves the developers environment, convert it into plain common JS.
  • Because of the existence of JavaScript compilers like Babel, folks who want to use these newest language feature, both experimental features and ultimately, features that have been made part of new specifications, can freely use those in their development. After making sure the appropriate plug-ins are installed in their Babel system the JS will be converted into the simplest syntax supported by all browsers.

This seems really critical to me. Imagine if you had to work with Google, Mozilla, and Microsoft to convince them to support a new JS feature before it could be used in a web page. Then you'd have to wait until all the old versions of the browsers were deprecated. Evolution of the language would not occur. The existence of JS compilers has made the rapid evolution of JS possible and it seems like that should be in the content of this page. TomClement (talk) 01:04, 23 November 2019 (UTC)

Babel is just one of the transpilers available these days. The role of transpilers is covered in the article, with a ref that has a comprehensive list, including Babel. -Pmffl (talk) 16:09, 24 February 2020 (UTC)

edit warring about JS being classified as an interpreted language[edit]

The last few days have seen some edit warring here about JS being classified as an interpreted language. I'm surprised there is disagreement on this point. As I noted yesterday, just-in-time compilation is really an optimization of interpretation.

JIT has been in use for over a decade, and client-side JS code is still downloaded from servers as human-readable source that has to be converted into machine code by the browser's JS engine. That's conversion at runtime, i.e. interpretation. The fact that JIT makes it considerably faster, on average, has been a really nice optimization; but,, etc. are still serving up jQuery in source form. That hasn't changed.

I'd like to get consensus on this point here. I skimmed the talk archives and didn't see any threads on this particular point. Perhaps there are other ways of classifying this that I'm unaware of. -Pmffl (talk) 16:20, 24 February 2020 (UTC)

I spent some time googling this issue, and now I better understand that this has been a lingering source of confusion for some people, including developers. The labels "interpreted" and "compiled" were established by the 1970s, decades before hardware was powerful enough for ideas like JIT to become a practical reality. Back then there was a clear separation of languages compiled by a developer, e.g. Fortran and C, and delivered as an executable binary, from others like Lisp and Scheme that were always delivered as source. So that's why my own concept of "interpreted" focuses on the mechanism of delivery. (As do others, like here.)
Since this is not such a cut-and-dry classification, I removed the "interpreted" label from the lede sentence of the article. -Pmffl (talk) 15:40, 25 February 2020 (UTC)

Mistake in "Weakly typed" table[edit]

The "Quirks" table contains a mistake not supported by either of the two cited references. Namely, the result of [] + {} is not {} but rather '[object Object]' (a string). This can also be verified by trying it in a modern REPL. When I tried to correct this the edit was rejected. What can I do better in the future?

--Lagewi (talk) 23:20, 9 March 2020 (UTC)

I tested it in the Chrome Console (Ctrl Shift I) and it turns out to be correct. It seems like the [] is an empty string, and {} is "[Object object]" - i've updated the table. (Link for testing:
(As for what you should've done, maybe use the edit summary to explain?)  AltoStev Talk 00:00, 16 April 2020 (UTC)
Edit: Oops, it seems like you've already made the change. Nevermind AltoStev Talk 00:04, 16 April 2020 (UTC)