JavaScript is the new Perl
31–40 of 45 posts
Re: JavaScript is the new Perl
#32Seems like a weird comparison. JavaScript is obligatory and available in all common browsers. It's fairly easy to get started, and even easier to actually accomplish something with it. Not sure if Perl is as accommodating (haven't tried it though). When all is said and done JavaScript is a very popular language. When you leave a company, having build something fairly complex - If you did your job properly, documented…
Lover of Perl and JavaScript alike here. It is a weird comparison. The two languages are used in very different ways; I guess the author is saying JavaScript will be supplanted by something nicer, like Perl has been. But Perl hasn’t been. Python and Ruby are cohabitors, not usurpers. A sizable chunk of the web’s infrastructure is still Perl, and that is unlikely to change. To give you an idea of the language, Perl is…
I thought so too. JavaScript seems like it's filling a gap, and by doing that it's ensuring its own survival. Either that, or we're forcing it into a specific purpose (i.e event based manipulation, animation, data i/o), but the end result will probably be the same. I have a hard time imagining something else coming along, at least not as long as JavaScript is... well, everywhere.
Thank you for explaining Perl to me. A proper module system, compile-time checking and the sort has, with JavaScript, been solved by using JSLint and AMD. Well, almost. It makes the code easier to maintain. Although I'm sure Perl is superior in that regard, it still works - and it works really well.
Re: JavaScript is the new Perl
#33I 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…
But anyway, eventually I think jQuery might not be as useful once most every browser has a sane implementation of the new ECMAScript harmony. But who knows, the jQuery API is so simple it might stay around on the browser for a while.
Re: JavaScript is the new Perl
#34We have an extensive JavaScript codebase at the large corporation I work at and by simply enforcing the use of ECMAScript 5 Strict Mode and verifying with JSLint we are able to catch most potential issues but then again, nobody there is writing large systems in JavaScript, only flourishes of browser-side interactivity...
Re: JavaScript is the new Perl
#35> Nobody actually does plain “JavaScript” programming for the web anymore, not really anyway. Do they use the core language? Yes. But we no longer use any of the built-in JavaScript->HTML functionality directly. Which is sort of a shame because there's stuff in there that totally obviates the need to haphazardly traverse the dom with jQuery. Finding the form an input element belongs to in jQuery: $('input').parents('…
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.
Re: JavaScript is the new Perl
#36I 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…
> I didn't know everyone hates Perl and I also didn't know those were the reason. Surely we don't want strange languages? Why the sarcasm? "Everyone", in everyday talk means "most people", and considered that Perl has long lost the spotlight it once had as a scripting language, that is a lot of people. As for the "strange" part, yes, surely we "don't want strange languages". Strange languages have always been margina…
Re: JavaScript is the new Perl
#37> Nobody actually does plain “JavaScript” programming for the web anymore, not really anyway. Do they use the core language? Yes. But we no longer use any of the built-in JavaScript->HTML functionality directly. Which is sort of a shame because there's stuff in there that totally obviates the need to haphazardly traverse the dom with jQuery. Finding the form an input element belongs to in jQuery: $('input').parents('…
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.
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 and crowd-sourced DOM documentation (via MDN).
Re: JavaScript is the new Perl
#38I 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…
> > 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 language popularity metrics, but very few if any new things are being done with Perl, at least in this neck of the woods.
> How is javascript like assembly?
Explained in other comments. It's more like bytecode. Many other languages are compiled to JavaScript (hundreds?)
> > There’s a similar explosion of JavaScript implementations on server side and in other languages, leading to issues with compatibility and runtime bugs.
> What is this based on? I haven't seen many problems with compatibility and runtime bugs in the Node ecosystem at all.
I've used systems that use other JavaScript interpreters than V8. Also I think he may be referring to incompatibility between browsers and server. Compare to Python or Ruby where there is a standard C implementation used the vast majority of the time and then a manageable number of competing implementations that can easily be ignored for compatibility reasons.
> > Still don’t believe that JavaScript is the new Perl? Compare jQuery to Perl CGI. Nobody actually does plain “JavaScript” programming for the web anymore, not really anyway. Do they use the core language? Yes. But we no longer use any of the built-in JavaScript->HTML functionality directly.
> Only holds limited truth for browser development. Everybody using jquery is using plain Javascript.
I don't understand. In my experience of web development, we are using JQuery, which is a Javascript library that abstracts most things you do in the browser just as Perl CGI is a library that abstracts most things to do with HTTP. You appear not be refuting what he wrote, but simply claiming he is wrong. What do you mean by saying that everybody using JQuery is also using plain Javascript?
> > jQuery is the glue that holds together the JavaScript ecosystem, provides browser compatibility, and it admittedly does a pretty good job.
> what?
Yes, yes, and yes. What issue do you take with this statement?
> > however, sooner or later, the lack of language constructs like truly enforceable namespace boundaries, and the general mess created when teams get a little bit bigger is going to set in.
> Name spacing is easily solved using module loaders and proper scoping.
His complaint is that it's not enforced. Sure, it's "easy" to use module loaders and proper scoping, but anybody is free to ignore them and boy do they!
> > We ARE inherently lazy and most of us will ignore nearly any best practice or principle once “that deadline” gets too close.
> Sorry, this just means you're a shitty developer and/or can't manage deadlines very well.
No, "you're" not a shitty developer, lots of real people working in a real companies are. Successful languages make it impossible to be a shitty (read: disorganized) developer in these respects. People who work in enterprise say this over and over as do, surprisingly, people in the programming languages community. Head over to Lambda the Ultimate or just take a look at the design choices that languages like Haskell make.
> > Still, you don’t see that many big Python and Ruby shops either (Google is an exception,)
> His exception is a pretty large one. And besides that, which companies has the author studied?
It's perfectly fine to include a statement of anecdotal truth in a blog post. Want some data? Take a look at TIOBE: http://www.tiobe.com/index.php/content/paperinfo/tpci/index..... The popular static languages are more popular than the popular dynamic languages by a factor of 4:1.
Re: JavaScript is the new Perl
#39Earlier quoted context omitted.
> I didn't know everyone hates Perl and I also didn't know those were the reason. Surely we don't want strange languages? Why the sarcasm? "Everyone", in everyday talk means "most people", and considered that Perl has long lost the spotlight it once had as a scripting language, that is a lot of people. As for the "strange" part, yes, surely we "don't want strange languages". Strange languages have always been margina…
The existence of cross-compilers (even popular ones) does not make a language "like assembly". Javascript is still overwhelmingly written in Javascript.
Re: JavaScript is the new Perl
#40Point 2: Node.js allows a team of 1-2 quickly get a server-side app up and running. Once a project takes off and needs to scale to a larger team, it's extremely easy to switch to and write C++ components.
Point 3: Who cares if history is repeating itself or not. It's an impressive technology stack with huge corporate backers. Besides, Perl is still used and although nowhere near as cool, still works great for writing shell scripts.