back to article JavaScript is everywhere. So are we all OK with that?

The JavaScript programming language has been in the wars over the years. Oft derided for security concerns, its ‘amateur’ web designer following and for ‘borrowing’ its name from the beefier brew that is Java itself, it has been a rough 19 years or so. Despite all this, JavaScript is still on every 'predictions for 2014 in …

COMMENTS

This topic is closed for new posts.
  1. Alan Bourke

    JavaScript's OK ...

    ... if a bit reliant on confusing messing around with functions.

    "If a mobile developer can use HTML5 and JavaScript to build a potentially 'ubiquitous' app capable of running everywhere, then why wouldn’t they?"

    Maybe in a few years you'll be able to do that. Maybe.

    1. sisk Silver badge

      Re: JavaScript's OK ...

      "If a mobile developer can use HTML5 and JavaScript to build a potentially 'ubiquitous' app capable of running everywhere, then why wouldn’t they?"

      Maybe in a few years you'll be able to do that. Maybe.

      Depending upon exactly what said app needs to do it's sometimes possible now. Trust me, I've done it. It's not always possible by any stretch of the imagination, but there are some really useful JavaScript powered webapps running around that just really don't care what device you use to access them.

  2. Anonymous Coward
    Anonymous Coward

    Not to mention Qt Quick

    Or perhaps best not to mention Qt Quick ;-)

  3. MatsSvensson

    10 alert('Hello');

    20 GOTO 10;

    1. Matthew Smith

      If your language has its lines numbered, theres no point completing them with semi-colons.

      1. Martin-73 Silver badge
        Coat

        IIRC, the semicolon tells it to put the next 'Hello' on the same line. But of course the parentheses aren't needed and you'd use double quotes. And surely they meant "PRINT" and... I'll get my coat

  4. Anonymous Coward
    Anonymous Coward

    Interpreted?

    "this interpreted programming language"

    Javascript hasn't been interpreted for several years now. Its JIT compiled, which is why its actually fast enough to be usable for proper applications.

  5. ciaran

    This Javascript tutorial

    almost tempts me to lean a new language

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript

    But my normal language is Perl, and my trade is mostly quick-and-dirty...

    1. sabroni Silver badge

      Re: my trade is mostly quick-and-dirty...

      then you should get on with JS!

  6. Matt Bucknall

    "too expressive in some ways, with features like closures..."

    Closures are its main bloody asset! It's a functional language and the moment you treat it as such instead of trying to bend it into it isn't (like Java), it actually becomes quite pleasant to work with.

    If Eich had got his way at Netscape, Javascript would have looked more like Scheme/LISP than a C descendent.

    1. Rob Carriere

      Re: "too expressive in some ways, with features like closures..."

      Yes, but it takes a programmer to understand that and the speaker being quoted was an analyst.

    2. DrXym Silver badge

      Re: "too expressive in some ways, with features like closures..."

      Functional programming would be great assuming Javascript were multithreaded but it hasn't gained such ability until recently and there are severe restrictions on how it can be used that way. Closures in JS have been used more to make the lack of OO functionality by attaching some functions to an object, a little like using a prototype although there are differences.

      Anyway, be glad it resembles a language people are familiar with. If it had resembled Scheme or Lisp it would have been DOA.

      1. BlueGreen

        Re: "too expressive in some ways, with features like closures..." @DrXym

        Multithreading is almost irrelevant to functional programming features, which are invaluable on their own. Immutability is more important for threading.

        1. DrXym Silver badge

          Re: "too expressive in some ways, with features like closures..." @DrXym

          I didn't say multithreading was irrelevant to functional programming. I said the main use of functional programming in JS was to make up for its lack of proper OO classes, to tack "methods" onto an object and use it like a class. It's being used as a bandaid because JS has grown up in a fairly organic manner. Even within JS, using a prototype is still recommended because it has a lower construction overhead (since it doesn't bind new closures to each time an object is made).

          As for immutability, it has very useful properties for ownership and so forth, But it can also suck big time which is why most languages leave the choice up to the developer. A simple example, would be a game which in the course of one loop might construct thousands of points, lines, planes for all its geometry and physics and all this would be massive overhead. Hence the game would use mutable objects which could be reused over and over.

          It is examples like this that doubtless explain why pure functional languages are largely confined to niche purposes and always will be.

      2. Neil Stansbury

        Re: "too expressive in some ways, with features like closures..."

        "Closures in JS have been used more to make the lack of OO functionality"

        Closures are nothing to do with OO functionality, they're to do with capturing execution scope. If all you want to do is attach some functions to an object call() & apply() are perfectly adequate.

        One of the successes of JS is the fact that so many patterns are possible. The downside of the expressiveness is that many people have little appreciation of what they're actually doing. The current obsession of seemingly declaring everything inside a closure is a case in point.

        1. DrXym Silver badge

          Re: "too expressive in some ways, with features like closures..."

          "Closures are nothing to do with OO functionality, they're to do with capturing execution scope. If all you want to do is attach some functions to an object call() & apply() are perfectly adequate."

          Oh dear, someone can't read. I said that's how they are used in JS. A common pattern (or anti pattern if you prefer) is write a "constructor" for an object which tacks on a bunch of closures which are bound to that new object and called as if they are methods. It's actually more efficient to use a prototype but some people use closures since they look a bit neater and use things like instanceof. It is very easy to look this up for yourself. I'm also aware of what a closure is in its wider definition.

    3. BlueGreen

      Re: "too expressive in some ways, with features like closures..." @Matt Bucknall

      Exactly!

      "with features like closures that make it less readable and more difficult to debug"

      bloody moron. You can encapsulate and abstract beautifully with these and other functional features to make things so simple debugging becomes much less needed.

      Why are the clueless allowed to opine in areas not their own? And doubtless get paid more than us to do so for that matter.

    4. pjc158

      Re: "too expressive in some ways, with features like closures..."

      Javascript is not a functional language (look at F# etc. for functional language), it is a scripting (the clue is in the name) language and was deisgned not for developing main stream applications!

      1. BlueGreen

        Re: "too expressive in some ways, with features like closures..." @pjc158

        javascript has all the pieces need to program in a functional way. Therefore it *can be* a functional language, depending how you use it. But I guess your point is that it isn't a strictly functional language; I buy that.

        1. P. Lee
          Coat

          Re: "too expressive in some ways, with features like closures..." @pjc158

          > it isn't a strictly functional language; I buy that.

          So what we need is... browser-based Miranda?

      2. Matt Bucknall

        Re: "too expressive in some ways, with features like closures..."@pjc158

        Whether a language is a scripting language or not is related to the level of operations programs written in the language are intended to perform - It has nothing to with the paradigm(s) a language supports. A scripting language can be procedural, object-oriented and/or functional just as much as a systems language can be.

        Indeed Javascript is more than a purely functional language, but that really stems from Netscape's insistence that Eich create something that looked more like Java (because that's what the cool kids were using) than Scheme, which is what he had originally wanted to implement and which is more than apparent if you use it functionally.

        The point I was originally trying to make was, the primary reason Javascript seems to receive so much bad press is because programmers come to it expecting to be able to structure their code into hierarchies of classes, the way they're used to. They find they have a hard time getting Javascript to work that way, because that's not how it was really intended to be used, so dismiss it as being crap. They fail to discover that, by changing their approach to suit Javascript instead of the other way around, it is actually quite a well thought-out and nice language to work in.

      3. Michael Wojcik Silver badge

        Re: "too expressive in some ways, with features like closures..."

        Javascript is not a functional language (look at F# etc. for functional language)

        Care to back that up with any actual arguments? And yes, I'm amply familiar with both the LISP family (LISP, Scheme, etc) and ML family (SML, OCaml, F#, etc) of functional languages.

        it is a scripting (the clue is in the name) language

        Utterly irrelevant, as others have noted. Do you have any idea what you're talking about?

        was deisgned not for developing main stream applications!

        No, apparently you don't.

  7. big_D Silver badge

    “the assembly language for the web”

    Shudder.

    As an assembly language programmer and web developer I resent that remark!

    1. hammarbtyp Silver badge

      Re: “the assembly language for the web”

      I think it would be more accurate to say ' the C language for the web'

      i.e Not the best language for large projects and missing many feature of it's more modern cousins, but ubiquitous and not going to be replaced soon.

      1. itzman
        FAIL

        Re: “the assembly language for the web”

        As a C programmer I resent that remark

      2. Michael Wojcik Silver badge

        Re: “the assembly language for the web”

        I think it would be more accurate to say ' the C language for the web'

        I think it would be more accurate to say "the JavaScript language for the web", though "the ECMAScript language..." would be more accurate yet.

        Really, what is this quixotic urge to analogize programming languages? Just stop, folks. The comparison is always more misleading than it is meaningful.

        1. flagd

          Re: “the assembly language for the web”

          The writer seems think this phrase is complimentary. It emphatically was not intended that way by the guy who coined it (James Gosling? not sure). He meant that it's a reasonable compilation target but that nobody in their right mind would choose it as a source code language (sorry assembly language guy). So the analogy actually is quite apt given what he was trying to say.

  8. WibbleMe

    Does anyone remember DHTML ?

    1. Anonymous Coward
      Anonymous Coward

      Sadly, yes!

    2. sisk Silver badge

      I still occasionally find myself fixing DHTML apps. Yeah, we've got some web apps that have been around that long and are still being used. I'm slowly getting them replaced with newer versions, but when you've got an app that's been around that long there's always some resistance to the new version.

    3. wikkity

      RE: Does anyone remember DHTML ?

      Eh, what do you use nowadays then?

  9. Amorous Cowherder
    Pint

    I have to admit the only reason I started messing about with JavaScript again was because I fancied playing with the fun stuff in jQuery. JS isn't as bad as it was 10 years ago, it's not great but then this is the usual "VHS was crap, Beta was better but VHS won on pure saturation!" argument all over a again!

    1. Michael Wojcik Silver badge

      jQuery

      I have to admit the only reason I started messing about with JavaScript again was because I fancied playing with the fun stuff in jQuery.

      That's a bit like deciding to start eating meat again so you can enjoy McDonalds' hamburgers.

      I mean, really, jQuery? A horrible overgrown pile of crap written by people who don't understand the language they're using, can't be bothered to read the specification, and throw hissy fits when someone else does and points out how wildly wrong their assumptions are?

      jQuery's the best reason to avoid JavaScript.

      1. oolor

        Re: jQuery

        > A horrible overgrown pile of crap written by people who don't understand the language they're using

        So it isn't just me.

        Then again, Michael, one could say the same about much of code :(

        Or maybe we are talking about the documentation. I reported 2 examples (by email) that had errors which beginners would be extremely confused by (on top of being obviously wrong). Instead of changing less than 10 characters of text, they put it up with my email that I assumed 'might' be kept private in the bug section for over a week before it was fixed.

        end_jQueryRant().chainABunchOfShit().startJSPraiseMachine();

        I don't do non-HTML5 anymore, so jQuery-type libraries (I liked YUI 2.somethinglate, but that was its own can of worms) have given their way to stuff like D3 (which I credit for my switch to HTML5) for quick testing, but anything proper is pure JS brutally shortened. Funny how going from testing in IE6 and Firefox to try to get alignments has switched to Firefox and Chrome to optimize UI performance and playing with 3D CSS.

        The way I now think of what a web page can do is miles from before (assuming same time input from me). Freed from the constraints of early JS lack-of-portability (damn you IE), I can make apps that will work on well over 90% of devices in the Western world with decent fall back and no extra crap. The sequences are not shortened. Nay, I have put a 250ms delay on certain actions because the response was too jarring:

        makeItAsFastAsiPhone(); // just kidding, I think

  10. LosD

    Flash's ActionScript just being repurposed Javascript is quite a stretch. It may be close for ActionScript 2, but while AS 3 is ECMAScript-based like Javascript, it is the dropped version 4 that supports strong typing and proper classes among other things.

    1. This post has been deleted by its author

      1. NotWorkAdmin

        Coudn't agree more

        Nothing annoys me more than a site that won't actually operate without me allowing code to be executed on the machine I'm using. A site should be able to offer it's core function without JS and this isn't actually that hard to do. Not if I can manage it.

        1. sisk Silver badge

          Re: Coudn't agree more

          A site should be able to offer it's core function without JS and this isn't actually that hard to do. Not if I can manage it.

          This is exactly why I shake my head in disbelief when I see people using JS for things like rollovers. CSS can do those and not break when someone has JS disabled. CSS3 can even animate them nicely, all without any scripts being executed.

        2. VinceH

          Re: Coudn't agree more

          "Nothing annoys me more than a site that won't actually operate without me allowing code to be executed on the machine I'm using. A site should be able to offer it's core function without JS and this isn't actually that hard to do. Not if I can manage it."

          Quite.

          What would be nice is if I visit a site and I have JS disabled (which I do because I use NoScript), instead of a message appear at the top of the page saying "Your browser appears to have JavaScript disabled, but this site works best with it enabled" (or words to that effect), the websites would actually say something more like:

          You appear to have JavaScript disabled. We understand why you might wish to do this, but this site does need JavaScript enabled in order to work best. The scripts we use are:

          * domain/address of Javascript file - summary of use

          * domain/address of Javascript file - summary of use

          * etc

          That way, I can decide which scripts to allow for this particular page, looking at those scripts if I feel it necessary. Otherwise I have to work this out for myself, by looking at the Noscript menu and/or page source, which is going to take longer. Often I can't be bothered and I look elsewhere - but presenting the information to me like that would probably encourage me to take the time to look/give this site a chance.

          1. Kieran

            Re: Coudn't agree more

            Hahaha. You're going to pay to access these sites right? You know, actual hard currency that the developers who would then have to actually spend time writing and maintaining these summaries of every individual JS file they're using (and presumably working around you deciding you like X but not Y) to accommodate your particular 1 in 10,000 visitors preference can use for things like food and housing?

            There's a browser sandbox for a reason. If there's a security hole that lets a site do something horrendous - then that's an issue for the browser and thanks to automatic updates it's one that's finally addressed pretty much universally these days without you having to care.

            I love the admission that you can't be bothered using Noscript - but you'd stop and read the summaries of every individual JS file before reading a blog post?! Sites that require Javascript to work properly require Javascript to work. Other websites are available. ;)

            1. VinceH
              FAIL

              Re: Coudn't agree more

              "Hahaha. You're going to pay to access these sites right?"

              Indirectly, yes - indirectly because the payment might, for example, take the form of me buying something being sold via the site versus, say, going somewhere else and buying that something.

              "You know, actual hard currency that the developers who would then have to actually spend time writing and maintaining these summaries of every individual JS file they're using"

              How positively evil of me. Next thing you know, I'll be expecting developers to put comments in their source code, or something crazy like that.

              "I love the admission that you can't be bothered using Noscript - but you'd stop and read the summaries of every individual JS file"

              Way to twist what I said into something I didn't. Go you.

              I said detailing those scripts would encourage me to do so. It would be a positive step by the developer, and make me feel more positive about using the site, and gives me the opportunity to make a more informed decision.

              I'm intrigued, as well, how the fact that I use NoScript can be interpreted as me saying I can't be bothered to use NoScript. I guess you're suggesting that I can't be bothered to look at the menus - but the menus are next to useless for deciding which scripts are necessary, which are frills, which I'd rather not trust, and so on. All they do is tell you the domains in question and give you the option of allowing or denying them. That is not an informed choice.

              "before reading a blog post?!"

              Poor example, but I'll take it on the chin because I should really have specified commercial sites: It's commercial sites on which I'm more inclined to want to make an informed choice about what scripts are in use and what they are doing.

              When it comes to things like blog posts and basic/more static sites, I'm much less worried about what the Javascript is doing - because I'm much less likely to be inclined to enable it for those sites anyway. Which itself neatly counters your opening paragraph and your objection to all these poor web developers having to spend time writing their summaries, without getting anything in return to pay the rent: these web developers/site owners aren't being paid much, if anything (myself included), but by the pure magic of the types of site, they don't have to worry about JS declarations.

              Having said that:

              1) many (most?) will likely be using CMSs developed by others, who may very well be making good money doing it - and it's these people who could build that functionality into those CMSs. (They're more likely to know what the systems use, too, than Joe Blogger who is using it for his site.)

              2) those websites will quite often work without Javascript; it might be less functional, but IME they are usually still readable, so it becomes irrelevant.

              "Sites that require Javascript to work properly require Javascript to work."

              Except when they don't, and the Javascript is there due to cluelessness - where javascript is used for basic functionality like links.

              "Other websites are available. ;)"

              Well done for basically telling me what I said when I said I can look elsewhere if a site doesn't work without Javascript.

        3. BongoJoe

          Re: Coudn't agree more

          The only time I have JavaScript on a page is to put the user control into the first web control on the page.

          It's a little neater like that, but that's the only time I would ever use it.

        4. This post has been deleted by its author

      2. This post has been deleted by its author

  11. RyokuMas Silver badge
    Mushroom

    The clue's in the name...

    I'm still hoping against hope that this current craze for javascript is nothing more than a fad. At the end of the day, it's a scripting language that has grown out of control. Anything more than small snippets that enhance a web page's performance start rapidly getting messy, making debugging a chore - whole applications based on this are the stuff of nightmares!

    What the web desperately needs is a properly structured programming language that allows full implementation of basic requirements (eg: inheritance, properties etc.), rather than continual hacks that further twist javascript in an attempt to maintain it far beyond its scope or purpose.

    1. proud2bgrumpy

      Re: The clue's in the name...

      SpiderBASIC (currently a very stable Alpha) looks interesting. Syntactically similar to the companies other more mature language "PureBASIC", SpiderBASIC *compiles* into JavaScript & CSS to allow rapid development of *WebApps* - check it out: http://www.purebasic.fr/english/viewtopic.php?f=14&t=58020

  12. Michael H.F. Wilkinson Silver badge

    Getting started in programming

    “If I was just getting started in programming, and I didn't know what language to pick, I would pick JavaScript,"

    I think that would depend on what you want. If you want to learn a programming language that is used a lot, and in many contexts, and allows you to do some nice stuff quickly, JS is fine, I suppose. If you want to learn to programme, I am not sure JS is the obvious choice. We prefer to teach imperative programming first, and then proceed to OO and functional languages (and of course parallel programming). Other curricula start out at the OO level immediately. Whatever the order, once you understand the principles, learning any language that implements these principles is comparatively easy. Many of our students use JS without ever having taken an official course. We flatter ourselves that this may have to do with us teaching them the fundamentals.

    1. Tom 7 Silver badge

      Re: Getting started in programming

      If you want to learn to program learn at least three different languages. Then if your language of choice doesn’t have some features you can add them.

      And you can do OO in JS - people don’t but its not that hard.

      Would have been a lot easier if certain companies hadn’t tried to kill it at puberty.

    2. sisk Silver badge

      Re: Getting started in programming

      “If I was just getting started in programming, and I didn't know what language to pick, I would pick JavaScript,"

      Personally I tell people to start with Python. Sure, it's not real popular, but it has an advantage for newbie programmers that no other language I've seen has: it forces you to develop good whitespace management habits. (I have a friend who started by teaching himself C++ and never was introduced to the concept of using whitespace till he asked me for help with a program. The only reason he had multiple lines was because of word wrap in his IDE. It was frightening to say the least.)

      Plus you can treat Python as a very simple language or as an OO language, so you get a couple different techniques with it. Once you learn one programming language (any language really) it's much easier to move on to others.

      1. M Gale

        Re: Getting started in programming

        it forces you to develop good whitespace management habits.

        And that's why I have total disdain for Python's style. It might be a nice language, but I'm totally uninterested in any coding language that gives a shit about where and how many times I hit the spacebar, tab or enter keys (or even carriage return, to be a complete pedant). Especially after trying code samples from web sites or other media that may have mangled the original whitespace.

        Good luck debugging that, especially if you're a complete newbie.

      2. Michael Wojcik Silver badge

        Re: Getting started in programming

        Personally I tell people to start with Python. Sure, it's not real popular

        It's very popular in the data-and-analytics domain, which is a growth area, so it can be quite a practical choice. If you know Excel1, Python, R, and Julia, you have most of the programming skillset for analytics. Obviously there's a ton of domain knowledge (statistics, machine learning, and application domains) still required, but you'd be on your way.

        1Yes, I'm aware Excel is not a programming language per se. And personally I loathe the thing. But Excel, and particularly pivot tables, are widely used by the analytics crowd, and if you want to argue for a different tool you at least have to understand the enemy.

  13. Anonymous Coward
    Anonymous Coward

    Javascript is the VB6 of the 2010's

    Just because something is popular does not mean that is better. Javascript does have some strengths (closures) that make it attractive for some uses, but in general Javascript has a number of big nuances that make it unsuitable for projects that require long term maintenance or are of significant complexity. It is, like VB6, extremely accessible and supported by a wide ecosystem of tools and technologies. But it does not have long term future (long term like C, C++ or Perl)

    Javascript was created out of the desire to make web pages dynamic and have a low learning barrier, not as a system level, server level or any kind of serious usage.

    My biggest pet peeves: lack of proper modularization and scoping at higher levels, lack of proper multithreading constructs and being typeless. The first prevents any serious development of components, the second any serious system level development and the third prevents any serious large scale systems. And by serious I mean robust enough to withstand the test of time.

    None of that means that it can't be done in Javascript, just means that it will take way more time and effort than doing it than with some other alternative. Yes, there are some large JS component libraries (jQuery), some dare to write server side (Node.js), and even some attempt to write Office like apps (Google Docs) But all these suffer from problems of stability, integration, performance and pale in front of rivals created in other languages better designed.

    And also none of that matters in the web world, where (a) Javascript is the only universally available client side language so you don't have anything else to choose and (b) the most common course of action is to rewrite things from scratch from time to time. But trying to make an argument from this about JS being good outside client side web pages is... plain wrong.

    And don't even get me started in PHP....

    1. dogged

      Re: Javascript is the VB6 of the 2010's

      It's better than VB6. I mean, you can actually do inheritance and even polymorphism in it if you know how prototype works. It's ugly but you can.

      The lack of type-safety is what really annoys me. I keep meaning to learn TypeScript (which is a superset of JS which compiles to plain JS) as a means of overcoming this horrible flaw but... never do find the time.

    2. Alan Bourke

      Re: Javascript is the VB6 of the 2010's

      The lack of scoping is a total PITA

    3. dajames Silver badge
      Unhappy

      Re: Javascript is the VB6 of the 2010's

      ... it does not have long term future ...

      Oh, I do so hope you are right!

      Unfortunately history teaches us to expect that languages that gain the sort of market penetration that Javascript now has will be around for a long time to come -- however good or bad they may be.

      Programming languages should, above all else, be easy to read and easy to maintain. This suggests that the language should have a small syntax and a large supporting library. Java and Python (among others) get this about right -- Javascript doesn't.

  14. Tom 38 Silver badge

    JS is like C++

    In that, yes it is awesomely great and powerful, and you can make gloriously beautiful code with it.

    The most important word in that sentence is "can". Most users of JS don't, however.

    The style of JS is largely driven by the framework you are using. JS written for Prototype will look wildly different to JS written for jQuery, which again will look wildly different to "stock" ECMAscript.

  15. Anonymous Coward
    Anonymous Coward

    Oh dear

    > Mostly everyone loves (or at least likes) JavaScript..

    hahahahahahaha

  16. fortran

    Why do I have NoScript?

    I hate going to a site that comes up as a blank, having to go to the NoScript control, and find that page has javascript for 2 million different web sites on it. Or visiting newspaper sites that only display content with the help of javascript (then I often find w3m works just fine).

  17. Leona A

    I HATE JavaScript

    with a passion!

    I hate its chaotic coding style.

    I hate its loosely typed Objects.

    I regard it as a 'lazy language'.

    I just can't my head around, or get on with, it at all.

    But since our workplace will be replacing our current front ends with it, I guess I will have to force myself to get used to it.

    Oh and not to mention its still totally inaccessible to Screen Readers and alike, but no one cares, so much for WAI a?

    1. captain veg

      Re: I HATE JavaScript

      And this is one of the reasons I love it.

      The poor thing is much misunderstood. It has taken time (and the writing of Doug Crockford), but I now can get my head around it, and get on with it very well.

      Which means continued gainful and enjoyable employment. Ta.

      -A.

    2. M Gale

      Re: I HATE JavaScript

      Oh and not to mention its still totally inaccessible to Screen Readers and alike

      Ahem.

      Same as when designing a site to be "accessible" via pure HTML, there are steps to be taken to ensure the screen reader interprets your dynamically-created content correctly.

      Beyond that though, Javascript is very accessible to screen readers.

  18. William Boyle

    Crap!

    I have 30+ years as a professional software engineer. I have been studying JavaScript lately and all I can say is this - GAH! From whay I have heard, it was originally written by one guy on one day, and it shows! I'd reather hammer a nail in my head than use it, but it seems in this age of web-insanity, it is necessary! I think I may write an alternative language for web development - something that makes some sense! I like php to some extent (it is more-or-less object oriented), but it is also a bit of a kluge. I used it to build a mobile phone web browser emulator, and had to fix some serious bugs that I posted to the development groups, and had them say "not a bug"... right! That and $5 will get you a nice latte at Starbucks!

    1. M Gale

      Re: Crap!

      Calling PHP "a bit of a kludge" is like calling the Nazi campaign in Russia "a bit of a foul up".

      Replace "bit of a" with "monumental" and you're getting closer with both. Not that PHP isn't very useful, but it does have its... quirks.

      Can I has Godwin nao?

  19. itzman

    Mostly this programmer HATES javascript.

    apart from that no comment

  20. Ioannis

    I used to hate JS when I was younger and not as wise; but with time I've come to realise that most of the times it's not the language that's schizo, it's the way it's been employed. JS has been much maligned because in the hands of web designers, it became what happens to a hyperactive 5yo with a bunch of Lego and superglue.

    Now, with Crockford's book and a careful re-examination of the language and the approach to using it, I've come to appreciate it, especially when used in the context of Node. Yes it still has it's WTF moments ( https://www.destroyallsoftware.com/talks/wat ) but every language does. All that's required to make it shine is a considered and careful approach.

  21. Anonymous Coward
    Anonymous Coward

    If we had Python in the browser

    Then the web would be a much better place.

  22. Spoonsinger
    Windows

    The whole message thread to this point makes me feel dirty.

    Off for a shower down via a large gin and tonic.

  23. Pascal Monett Silver badge

    "If I was just getting started in programming, and I didn't know what language to pick...."

    I wouldn't pick JavaScript because I would not know it existed.

    I'd more likely pick Visual Basic because I've heard of that in school.

    Of course, if I were a somewhat enlightened individual I would use the web (who am I kidding? I'd Google it) and search for "programming language", intent on finding what is the best language for beginners.

    And I'd probably end up choosing Visual Basic anyway, once I had been allowed to leave the hospital after my trauma treatment of having read all the bile that is thrown around on everyone else's programming language and had managed to decide to learn programming in spite of all the hate, condescendence and mockery that abounds when commenting programming languages.

    But I doubt that a beginner programmer is going to go for JavaScript since JavaScript is nothing without a browser and HTML, CSS and probably PHP, and all that is a bit much for someone who doesn't even know Hello World yet.

    1. Michael Wojcik Silver badge

      Re: "If I was just getting started in programming, and I didn't know what language to pick...."

      Wojcik's Law of Diverging Programming Language Quality:1

      Every programming language is the worst, except for at least one other language.

      1Which I just now invented.

    2. Michael Wojcik Silver badge

      Re: "If I was just getting started in programming, and I didn't know what language to pick...."

      JavaScript is nothing without a browser and HTML, CSS and probably PHP

      Even in its natural habitat, JavaScript requires nothing more than HTML - not CSS, and certainly not PHP. And there are JavaScript shells where the language can be learned interactively with no HTML in sight (though of course eventually you'll want HTML to explore using the DOM).

  24. Anonymous Coward
    Anonymous Coward

    Actionscript just repurposes Javascript!?!?!?!

    Not at all, I work in Banking and implement Flex based trading systems and Javascript/Chromium based Trading systems. I can tell you for nothing that AS3 is a completely superior language to JavaScript. It is strongly typed and has more in common with Java than it does javaScript. True AS3 is a dynamic language, supports functional programming, and can be used like a scripting language. But AS3 is so much more.

    It is sad that the industry is casting aside AS3 - things like TypeScript profess to bring to Javascript some of the power of AS3 - but this author quite clearly has not worked with ActionScript - or at the very least has not done so since AS1 & AS2.

  25. DerekCurrie Bronze badge

    ECMAScript is the name; JavaScript is a quaint old sentimental name we can't give up

    These days, 'JavaScript' is just a quaint old sentimental name that proves how stupid marketing morons (versus marketing mavens) can be when the put their minds to it. It was invented by Netscape as 'Mocha', changed to 'LiveScript', then renamed 'JavaScript' after some jerks from Sun Microsystems and Netscape decided it would be RadiKewl to make it sound like 'Java', the Sun programming language, despite having no relationship to it whatsoever.

    Then 'JavaScript' went mongrel and has remained that way ever since. Microsoft vomited in their own code, imaginatively called 'JScript'. Adobe egested their own code, called 'ActionScript'. Chaos ensued. Ecma International took control of the situation and hammered out an actual standard, officially called ECMAScript. 'JavaScript' refers only to the original old source core of ECMAScript.

    Meanwhile, despite ECMAScript being a standard, even more mongrel code calls are consistently mated into the mess, causing no two web browsers to consistently render ECMAScript the same, returning us back into a state of chaos.

    The Biggest Fattest Problem with ECMAScript has always been security. There isn't any. Enough said.

    1. Michael Wojcik Silver badge

      Re: ECMAScript is the name; JavaScript is a quaint old sentimental name we can't give up

      'JavaScript' refers only to the original old source core of ECMAScript.

      Not true. It's still the official name of Mozilla's ECMAScript implementation.

      And, of course, it's still by far (modulo capitalization) the most commonly used name for ECMAScript implementations in browsers, regardless of vendor. The English language is not mandated by standards organizations. While "ECMAScript" is indeed the official name of the language, the de facto name remains "JavaScript" simply because that's what most people call it.

  26. Wommit
    Pint

    WOW

    Beer - Check

    Popcorn - Check

    More beer - Check

    OK now to read these comments.

  27. Anonymous Coward
    Anonymous Coward

    All sooo angry...

    A lot of talk on here about jQuery, YUI etc. and not much mention of some of the better frameworks coming out, employing MVC design pattern, well structured code, file organisation and a huge emphasis placed on TDD (see angularjs, backbone etc) which I think might be the driving factor behind this resurgence.

    Good web development still espouses progressive enhancement/graceful degradation and should work without javascript as stated by many angry individuals. Unfortunately most users aren't as well versed as the readership here and will want to know "why doesn't this site have an amazing fade effect on submitting the form before presenting me with a friendly success message like my favourite site does and why does the WHOLE PAGE reload? which is clunky and ugh and I'm going to use a different service."

    As for the person who wants to review my code before he allows his browser to download it, it will have been concatenated and pushed through yuicompress to improve download time, so enjoy sifting through that.

This topic is closed for new posts.

Biting the hand that feeds IT © 1998–2019