'State of JavaScript 2018' Survey Announced (stateofjs.com) 70
"The JavaScript world could use a bit of classification," reads this year's announcement at StateofJS.com:
In 2017 this survey helped us do just that, by collecting data from over 20,000 developers to identify current and upcoming trends. This year, we're asking for your help once more to find out which libraries developers want to learn next, which have the best satisfaction ratings, and much more.
The survey launched in 2016 "mostly to scratch my own itch," its founder explained in a Medium essay. "I wanted to know what libraries were worth learning, and which ones were on the way out." Last year's survey discovered that React was the dominant framework, though the second most-popular framework was "none," with 9,493 JavaScript developers saying they didn't use one. Vue had increased in popularity while Angular lost steam, and developers collectively rating their overall happiness with front-end tools at 3.8 (on a scale up to five).
And more than 28% of the survey's respondent's said they'd used TypeScript, Microsoft's typed superset of JavaScript, and that they'd use it again.
The survey launched in 2016 "mostly to scratch my own itch," its founder explained in a Medium essay. "I wanted to know what libraries were worth learning, and which ones were on the way out." Last year's survey discovered that React was the dominant framework, though the second most-popular framework was "none," with 9,493 JavaScript developers saying they didn't use one. Vue had increased in popularity while Angular lost steam, and developers collectively rating their overall happiness with front-end tools at 3.8 (on a scale up to five).
And more than 28% of the survey's respondent's said they'd used TypeScript, Microsoft's typed superset of JavaScript, and that they'd use it again.
Same as 2017 (Score:1)
It still sucks.
Re: (Score:2)
This. Having to do this:
function test() {
}
if(typeof(window) !== "undefined") {
window.test = test;
}
sometimes window isn't defined so you have to test for it. The weird !== with two equals shouldn't be needed. Finally, a function should just work. You shouldn't have to do the window.test thing.
State of Javascript from the user's point of view (Score:5, Insightful)
- 80% are ads, web trackers and other malware
- 10% are useless eye candy that waste time and CPU
- 5% are misguided attempts to turn web browsers into terminals and bypassing HTML as much as possible, that usually result in unusable interfaces that don't behave properly and waste CPU
- 5% are actually useful on the pages they're used on
Javascript isn't the problem, it's the developers who foist it on us because they're incompetent, greedy or nefarious. Still, I can't count the number of hours I waste every week trying to find out in Noscript or uBlock the minimal number of scripts I have to allow to access a web page. Fuck Javascript.
Re: State of Javascript from the user's point of (Score:3)
In C, there's a basis. It's near machine level and machines don't see data types. Types in C are a sugar to make life easier.
JavaScript is not machine level. It has no excuse. Same goes for Python.
Once you go past the very low level, you should have strongly typed languages because type means something then. It's a real thing that's independent of the machine.
It would be interesting to see an Adascript or an Eiffelscript.
Re: State of Javascript from the user's point of (Score:2)
I think you mean "strictly," not "strongly." // JavaScript // not strict // strong // C // strict // not strong
let foo = 'bar';
typeof(foo) === 'string';
int blah = 5;
void *glarb = blah;
Aside from that, you're still wrong. :-) Languages are for people to understand and write, not computers. People can (and do) write more lines of code with JS and Python nowadays than in C even though fewer lines of code are necessary than the equivalent C. They're getting more done. Harkening back to "good old days" that neve
Re: (Score:2)
Ok, I'm oh approaching 50, and no, strongly typed is the correct term.
And, no, if programs were written for people, we'd be using 4th and 5th generation languages, not 3rd, and the most popular 3rd gen would be D, not Java.
Harkening back... so you're saying there was an Eiffelscript? Because I sure as hell have never said anything nice about the old days.
There's only one thing that proves one coder better than another -- the ability to learn something new. For every other metric you can think of, there'll b
The state is... (Score:1)
It’s easily summed up in two words:
Shit sux.
Things get better (Score:3)
I have known some Javascript ever since it was invented and spent decades avoiding it as much as possible. I can't remember who it was but they wrote that "Javascript is the most feared language" in computer science.
Now that I am doing client-side web apps it is unavoidable. Except, of course, for Microsoft wonderful effort into Typescript. It takes away none of Javascript's "strengths" (such as they are) but it makes it possible to get serious assistance from your IDE. You end up not as constrained as Java but you feel less like you are tossed into a chaotic lake of famished crocodiles, horny hippos and drunk rednecks in speedboats firing guns everywhere.
Thanks to Typescript I don't feel like I am writing Javascript any more than I feel like I am writing in assembly language when I code in C. Only an occasional trip to w3schools or stackoverflow is all that is needed to cover the quirky things I didn't know.
That said, I always wonder why anyone can be in doubt about why Javascript is so ascendant. There can be no reason other than it had access to the pervasive API of the browser environment. In other words the DOM and the browser-provided objects. That, and the fact that the build environment and the runtime environment were one and the same, helping countless legions of amateurs to get "into" web programming.
With all its flaws Javascript fell into a mucky pond and evolved into an ecosystem were a lot of people could make a living from using it. That's what made it successful. It has little or nothing to do with the merits (or demerits) of the language itself.
Imagine if Google had created node.js first, and all browsers were using some other language like Python. Nobody but a quirky minority would pay any attention to Javascript whatever. Now pretty much all of us have to pay attention.
Re: Things get better (Score:2)
"Imagine if Google had created node.js first, and all browsers were using some other language like Python."
LOL! That's some interesting time travel you've got there! Chrome forked from WebKit (forked from KHTML) in what? Late 2000s? Google didn't even make Node.js! But let's say they did, for the sake of argument. That still leaves over 10 years of JS in the browser. (Hello, Netscape 2.0 Gold Beta!)
Python would have been a non-starter because Sun wanted Netscape to make a scripting language that superficial
Re: (Score:2)
but it was never gonna happen. Best to let it go and move on.
You seem to have completely missed the point. I have nothing here to "let go" of to move on.
All I was doing is pointing out that if Javascript (as it was not ES2017) did not have the browser environment ecosystem it was hatched in it never would have achieved much prominence.
Re: Things get better (Score:2)
And if C hasn't been invented alongside Unix, it would never have taken off either. Every popular language has a killer app, no exceptions. Conversely no language ever became popular without a killer app.
That JavaScript would never have become popular without its killer app is merely asserting a tautology.
Re: (Score:2)
That JavaScript would never have become popular without its killer app is merely asserting a tautology.
Maybe so, but you will notice that every time a survey like this is done and Javascript ranks so high you get dozens of posts about confounding it is how anyone ever uses Javascript because how awful Javascript is. So the trivial assertion you are pointing out is missed by many.
None at all (Score:2)
http://vanilla-js.com/ [vanilla-js.com]
Look at the speed comparisons. And the other big bonus is not having to download multiple hundred kilobytes (if not megabytes) of framework code.
I loathe JavaScript (Score:2)
But Microsoft's attempt to embrace, extend and extinguish makes me want to defend it. Just not enough to do so.
Tcl was once a rival to JavaScript. There was a plugin for Netscape when it was at peak fame and JavaScript was still relatively unknown that allowed you to run client-side Tcl scripts in web pages. It would have been a lot better, in some respects, but Tcl isn't a terribly stable language and the plugin got no traction.
Still, you'd have far better code today.
JavaScript does serve some purpose, alt
Re: I loathe JavaScript (Score:2)
"â¦still slowâ¦"
[citation needed]
Re: I loathe JavaScript (Score:3)
Wow! 2018 and Slashdot still can't handle simple Unicode like ellipses. No combining characters, just a simple two-byte UTF-8 sequence.
Too bad it was written in Perl and not JavaScript. :-D
(Yes, I know Perl supports Unicode now. Yes, I know server-side JavaScript only existed as Netscape's proprietary LiveScript at the time. But it's been 20 years. Talk about living in the past. Can I even do a Euro character? Are they still on ISO-8859-1 or have at least updated to ISO-8859-15?)
Re: (Score:2)
Are you seriously suggesting "upgrading" a Perl serverside codebase to Javascript? Seriously? Perhaps you have not heard of Go, Python or Java.
Re: (Score:2)
Why not? I haven't done anything significant in it myself but Rust appears to be a more than decent server side platform.
Re: I loathe JavaScript (Score:3)
Technically I was just mocking Slashdot's inability to handle standard multibyte character encodings like UTF-8. Typically I would not recommend rewriting a working codebase simply to switch languages.
But since you brought it up, yes, I think in 2018 it would make more sense to write a web site in JavaScript than Perl. Go would be my choice for something where I would be looking at C but want internet-capable services.
Python is a (slightly) more elegant language, but the V8 engine eats the various Python VM
Re: I loathe JavaScript (Score:2)
Apples and oranges. Dart was intended to be simply a "cleaner JavaScript" in the same vein as TypeScript. Too little too late though. JavaScript was sufficient. And I say sufficient because it's obviously used extensively. PHP is more extreme example of ugly but obviously usable since empirically it is widely used.
WebAssembly on the other hand is a compilation target, not something you would code yourself by hand. Rust-to-WebAssembly is an impressive combination IMHO that I hope to see a lot more of.
JavaScritp is still JavaShit (Score:2)
Wake me up when we can stop doing dumb hacks like this to detect what version of the language the browser has implemented. I guess providing a const window.JSVER took too much effort.
Re: JavaScritp is still JavaShit (Score:3)
Why would you turn strict mode off mid-way through a file or function?
Fun fact: "use strict" was derived from Perl, the language Slashdot is written in.
Fun fact #2: JavaScript is also used on the server side where script tag hacks are unnecessary.
Fun fact #3: The vast majority of folks don't specify version anymore. No point really with current browser usage. Perhaps your knowledge of JavaScript is out of date?
Re: (Score:2)
Got nothing to say about the Javascript integer disaster?
Re: (Score:2)
Arbitrary precision is inefficient beyond belief for the vast majority of cases where integers are appropriate.
Re: JavaScritp BigInt proposal (Score:2)
And the vast majority of people don't need numbers larger than 2^53. Don't get me wrong, I'm looking forward to using BigInt, but mostly for conversions to/from 64bit numbers. In actual usage, I rarely find 2^53 to be constraining.
I take that back; bitwise operations being limited to 32bits is a legitimate pain. Yet another reason I'm looking forward to working with BigInt.
Re: (Score:2)
There's no integer in Javascript, only doubles. ;).
No integer => no integer disaster
Re: (Score:2)
I suppose that you have no idea why it is bad to use floats in place of integers. Only ever programmed in Javascript?
Re: (Score:2)
I suppose that you have no idea how to use a sarcasm detector. ;)
I don't want to touch this turd of a programming language with a ten foot pole.
Re: (Score:2)
Yah, sorry about that. You see, there are actually people who believe that having no integers makes the language better.
Re: JavaScritp is still JavaShit (Score:2)
It's amazing what you can accomplish when "constrained" to 2^53 (Number.MAX_SAFE_INTEGER). Sometimes a language is "good enough." Can't tell you how often I've wondered if something would work in Node and all I have to do is open of the dev console in Chrome to try it.
Perfect is the enemy of good.
Re: (Score:2)
It's amazing what you can accomplish when "constrained" to 2^53...
So true, for one thing you can ship code with more bugs in it, essentially a full time employment pact for Javascript hacks. You can also slow down computers with a bunch of extra code necessary to check boundary conditions, selling more of them. Sweet.
Re: JavaScritp is still JavaShit (Score:2)
Oh stop. When you spec out a project, you see where values would never exceed 256, so you use a byte, 16-bits for less than 65536, 32-bits for less than 4 billion, half these for signed values, etc. We all do this every day and twice on Sunday. If this were not the case, *all* numeric values in a system would always be 64-bit.
There are a huge number of cases where 4 billion would be constraining but 2^53 would be more than enough to avoid overflow. YouTube itself only had a 32-bit overflow for popular video
Re: JavaScritp is still JavaShit (Score:2)
Mantissa doesn't lose information until 2^53, ie., a fairly large number. If you need to do 64-bit bitwise operations, absolutely, JavaScript is not the tool you want to use. Instead use a different language with different trade offs. :-)
Re: (Score:1)
I haven't touched JavaScript in about 10 years so I'm not going to comment on that, but "use strict" is quite possibly the worst idea in Perl. I don't know why JavaScript would copy it.
Re: (Score:2)
Clarification: It shouldn't exist because the language should just behave that way by default.
Re: JavaScritp is still JavaShit (Score:2)
Coulda, shoulda, woulda. Most languages don't start out polished. You either break backward compatibility (and break literally millions of web sites) or you put in something like "use strict".
Languages that break compatibility get used as often as Lua, forever stuck at 5.1 with luajit or slow with 5.3.
Or you run into great gnashing of teeth and fracturing the community like Python's 2.7->3.0 transition.
Can't you just give credit where credit is due that web pages authored in 1995 still work? Phone apps w
Re: JavaScritp is still JavaShit (Score:2)
Fun fact #4:
if (foo == null) // double equals
is still useful. Covers null, undefined, and empty string. The Google JS programming style guide actually forbids triple equal comparisons with null.
But feel free to continue on your rant, especially since BigInt already landed in V8 and is available in the newest builds of Node. You seem to be on a roll.
Re: JavaScritp is still JavaShit (Score:2)
BigInt is the name of the *spec* that handles large numbers, of which so far V8 has implemented, so therefore available in newer builds of Chrome and Node.
There is no reason to believe Firefox and Edge will not follow suit shortly.
Re: JavaScritp is still JavaShit (Score:2)
And since you've invited us to the Slashdot pedant party, Node is written in C and C++. It *executes* JavaScript. Node is not "written" in JavaScript though most of its core modules contain JavaScript. Sockets: C. Process management: C. HTTP: mostly JavaScript, but completely dependent upon Buffer, which is a C interface to memory. Crypto: C.
Careful picking a technical fight about Node with a code contributor to Node. ;-)
Re: JavaScritp is still JavaShit (Score:2)
It *is* a keyword. They however are calling typeof(...), which by contract *always* returns a string.
"Identify current and upcoming trends" (Score:3)
I don't care about the latest fashion trends. Javascript isn't able to meet basic requirements that have been standards for decades.
Re: "Identify current and upcoming trends" (Score:2)
Such as?