Earlier quoted context omitted.
Unless you want to support IE7, that is. http://caniuse.com/#search=queryselector Not that I recommend doing so, but in many cases you don't have a choice. Or you started working on a project that originally needed to, and maintaining consistent style might lead you to use jQuery everywhere.
Of course. My main point wasn't the use of querySelector per se, but the ability to access the exact DOM element(s) you need without crazy querying or traversal. While the DOM API isn't perfect by any means, and jQuery fills that gap really well, there are still times where the OOP nature of the DOM gets you exactly what you want with minimal faff. The other problem is the relative obscurity of it thanks to jQuery an…
JavaScript is the new Perl
41–45 of 45 posts
Re: JavaScript is the new Perl
#42There is no such magic stack that withstands sloppy code.
Re: JavaScript is the new Perl
#43Earlier quoted context omitted.
I agree with a lot of what you said, but I can see one area where I can see what the author is trying to say. > How is javascript like assembly? You're right that JavaScript is not like assembly; it's more like bytecode. A number of different languages compile to JavaScript (CoffeeScript, TypeKit, Fay), which is then interpreted. While the intent of JavaScript is that it should be readable by humans, in practice this…
Ok, I can see that point. I guess the big difference is that not many people write in bytecode, but a lot of people (majority in my experience, which might change) write in pure Javascript
That's purely a matter of preference. If you want, you can write in Java, C# or C++ and compile that to JavaScript, many major websites use that approach.
The fact that many people still write pure JavaScript shows the opposite of what the article says: People like it and are productive with it. If they were not, they would more often write in something else and compile to it.
Re: JavaScript is the new Perl
#44Earlier quoted context omitted.
PHP is most likely not on the system they have. I don't know about OS X but it doesn't come with any popular Linux distro and it doesn't come with Windows either. Neither does Perl.
Most people don't try to host their first web site on their windows box. They likely get a shared host for $3 a month somewhere. This probably has a little sample site with a few lines of PHP and some JavaScript on it. When I started, I did not know the difference between PHP, JavaScript and HTML. I thought it was all "web markup".
Most people dont host their first web site period. I never heard of anyone who didn't learn PHP offline, on a local Apache server.
Re: JavaScript is the new Perl
#45I don't really feel like being the next Perl is a bad thing, contrary to the article's premise. However, the author is making a lot of unbacked and sensational claims. I feel inclined to comment on each part. > everyone hates [Perl] because it’s “too hard to maintain” and too “strange.” I didn't know everyone hates Perl and I also didn't know those were the reason. Surely we don't want strange languages? > global var…
This post reads a bit inflammatory to me and I take issue with most of your points. > > everyone hates [Perl] because it’s “too hard to maintain” and too “strange.” > I didn't know everyone hates Perl and I also didn't know those were the reason. More accurately: nobody cares about Perl. Not 'nobody', but most people. It's hyperbole. You might argue that there is still a lot of Perl around according to programming la…
Perl is used extensively and probably more than any other language in its stride even when it comes to new projects. Unless your definition of new projects are projects which spit out HTML and nothing else.
A very big world exists outside web development.
>>Want some data? Take a look at TIOBE
I don't trust data which includes treats ruby(the programming language) and ruby(stones) or Python(the programming language) and Python(the snake) as same.
>>The popular static languages are more popular than the popular dynamic languages by a factor of 4:1.
Correction, IDEs of popular static languages(Read Java and C#) are more famous than static languages themselves. Who 'really' programs in those languages these days? Today its all about auto complete magic with armies of low paid mediocre programmers. In fact IDE's are the only reason why static languages are even round.
Else who has the time to sit down and write 20 lines of code with 10's of API calls just to open and write a line to a file?
For 99% projects programmer time is vastly more expensive than CPU time.