7 ms·
I agree to a certain degree, but as someone who has been doing JavaScript. It's the same there. It actually seems true for most scripting languages. It even is
by tete 10y ago
I agree to a certain degree, but as someone who has been doing JavaScript. It's the same there. It actually seems true for most scripting languages. It even is true for Python.
There are however code linters, formatters, etc. You use those you can do the same in Perl (6).
You need style guides, yes even in Python. In Python there is a bit more community wide agreement though.
And even in other languages you need style guides, but often they are already enforced or strongly encouraged by the IDE you use.
Anyway, when comparing with JavaScript the problem seems to be the same. Lone scripter code is barely readable by others, while in teams style guides are often created and enforced. The same appears to be true for Perl.
I am not using Perl (anymore), but I think the main reason for this argument being mostly used in the context is that Perl has been around for longer, which means you have more code written detached from the community. Also Perl has been used a lot more by people that refer to themselves primarily as sysadmins, rather than programmers.
When comparing programmer code with system administrators code JavaScript, Perl, Ruby and Python are all harder to read and more different from commonly agreed style.
So I agree that your argument is true for why Go or Javan are used and maybe to a small degree to Python, because that seems to be the strictest language, but if you compare it with JavaScript, I think they pretty much even out on weird things they allow and that is frequently done.
I think there are some other reasons for JavaScript being used more. It's not Async IO[1]. One of the reasons is web development. There is just many people who start out their career as what we nowadays consider frontend people and the step simply is smaller, even if they eventually become systems programmers, write drivers and OSs the introduction frequently was through browsers.
Another reason is performance. V8 and Spidermonkey are probably some of the most advanced interpreters out there when it comes to code optimization (other than what Facebook did to PHP). That's if you include the complexity of the language. Of course there are highly optimizing interpreters for languages that are simpler.
Tools, libraries, etc. While Perl 5 is really good there, Perl 6 is not quite there yet. Also there is no commercial company behind it, only a not too big (compared to Mozilla) foundation, which makes it harder to do PR and gain traction.
[1] think about it, libev, which was done done after libevent, and which for a while even was used by node.js, after they created libuv, mostly for better Windows support was done by a Perl guy and is widely used by the Perl community. Also they had callback, future, promise based systems and abstraction layers for quite a while.