Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

The JavaScript Juggernaut Rolls On 505

JThaddeus writes "An article in TechWorld Australia summarizes the latest opinions on JavaScript from ThoughtWorks: 'There is no end in sight to the rise of JavaScript... "I think JavaScript has been seen as a serious language for the last two or three years; I think now increasingly we're seeing JavaScript as a platform," said Sam Newman, ThoughtWorks' Global Innovation Lead.' The article touches on new additions to JavaScript tools, techniques, and languages built on JavaScript. As the fuller report (PDF) says, 'The ecosystem around JavaScript as a serious application platform continues to evolve. Many interesting new tools for testing, building, and managing dependencies in both server- and client-side JavaScript applications have emerged recently.'"
This discussion has been archived. No new comments can be posted.

The JavaScript Juggernaut Rolls On

Comments Filter:
  • by Anonymous Coward on Saturday February 01, 2014 @12:48PM (#46128605)

    Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?

    Then we could use pretty much any scripting language we wanted with the content.

  • Re:Peak "platform" (Score:4, Interesting)

    by Lumpio- ( 986581 ) on Saturday February 01, 2014 @12:54PM (#46128639)
    Not as bad a "solution". I've seen knives marketed as "cutting solutions".
  • jscript (Score:5, Interesting)

    by Horshu ( 2754893 ) on Saturday February 01, 2014 @01:03PM (#46128669)
    I just started on a web project that is heavily javascript (even though it's an ASP.Net app). It feels like I stepped back in time 10 years. I'd have code not execute. Why? Some error somewhere in the code that was ignored. I had a typo on a property set somewhere else. No error. Why? Because javascript created a new property with the typo and set *that*. And every change requires me to run the app to see if it works, because I don't have a compiler to check the basics out ahead of time. And then, because I'm debugging an app in one window, when I'd open a new one to read the news, I'd hit other, non-ignored errors on those pages (advertisements) because 90% of commercial pages these days have error-laden javascript because people rarely check for error conditions. Horrible language.
  • by Animats ( 122034 ) on Saturday February 01, 2014 @01:10PM (#46128715) Homepage

    Arguably, it should have been Python, which is a better language. But Python has a problem. Python's little tin god, Guido von Rossum, is in love with his own implementation, CPython. CPython is a naive interpreter. (A "naive interpreter" is one which does the specified operations in the specified order, with little optimization across operations.) In CPython, everything is a dictionary and a lot of time is spent doing lookups. This allows everything to be dynamic. In Python, one thread can patch objects in another thread while both are running. Objects can gain or lose elements on the fly. Even running code can be "monkey-patched".

    The price paid for that excessive dynamism is that a Python compiler is hard to write, and an optimizing Python compiler can't optiimize much. Google tried in-house to make Python faster, and their "Unladed Swallow" failed humililatingly. (A different group at Google then developed Go, aimed at the same problem of producing something good for server-side processing.) The PyPy crowd has tried, hard, to make an optimizing Python compiler, and with an incredible amount of complexity under the hood, has made considerable progress, but not enough that PyPy is used much in production.

    Pascal went down for a similar reason. Wirth was in love with his elegant recursive-descent compiler. But it didn't optimize, couldn't handle separate compilation, and had no way to handle errors other than aborting. Python seems to be headed for similar irrelevance. It hasn't even been able to replace Perl, which ought to be as marginal as "awk" by now.

  • Re:Replusive (Score:5, Interesting)

    by hibiki_r ( 649814 ) on Saturday February 01, 2014 @01:17PM (#46128763)

    They don't always make it: Many do not make it at all. Survivor bias and all that.

    JavaScript thrived because the alternatives were arguably far worse. Java applets were terrible. ActiveX a platform specific disaster. Flash is heavy. JavaScript allowed you to do the very minor things most web developers wanted at the time without having to turn your website into a plugin that disregarded base web technologies.

    Yes, the language design is pretty silly. The function declaration syntax is silly. It tries to look like a member of the Algol tree, but its internals behave more like Lisp. The automatic type conversion system is the source of many jokes. But it still beat it competition at the time, because it was built into the browser, it talked directly to the page's DOM, and the competition did not. Today we'd have little trouble designing a better language than JavaScript for what we currently do with it, but our best bet to get something like that working is to build a language that compiles to JavaScript and then hoping browsers start building VMs for that language directly, skipping the JavaScript step. Still, not bloody likely.

  • by Anonymous Coward on Saturday February 01, 2014 @01:28PM (#46128829)

    My beef with JS is that it is a regression from the time of PASCAL or Ada (or should I say ALGOL ?) where good programs are nicely structured by means of proper data structures.
    This means:
    1.) Reliability is unecessarily low. You never know how many feet an object in variable "monkey" might have. Usually two and sometimes just one, zero or 312.
    2.) Security: A lack of type-safety regularly results in insecure programs. Plus, it is quite difficult to reason about program safety in absence of strong typing.
    3.) Hard to optimize: Strongly typed languages result in programs which can be quite easily optimized for execution efficiency. Compare that to JS, where the optimizer has to "infer" "typical runtime type" and then optimize for that "dynamic" type constellation. Of course, exception code must handle the "differently typed corner cases", too.
    That implies: Bloated optimizer/JIT compiler plus all the nice zero-day exploits which result from this. Donning my tinfoil hat I would say JS is a godsend for the TLAs.

    In summary: JS is a regression from the state of the art of 1970s. "IT" is actually forgetting the great achievements in Software Engineering that resulted in Algol. With JavaScript, computing has gone even further down the path of sloppiness and anti-reliability. Let's face it: 99% of people are in this profession for the love of money, not for the love of constructing reliable and correct systems.

    Dipl.-Ing.(BA) Informationstechnik Frank Gerlach

    As a counter-concept, look at this invention of mine:http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw

  • Re:Replusive (Score:5, Interesting)

    by hey! ( 33014 ) on Saturday February 01, 2014 @01:32PM (#46128857) Homepage Journal

    Because it's easy to mistake one's personal biases for sound judgment about what is "good".

    I won't sit here and defend every design decision in javascript, but it's a lot more sophisticated than meets the eye. I think of it more like Lisp than Java; it encourages (among skilled programmers) a functional programming style, which turns out to be both under-used as a programming paradigm and very nicely fitted to the kind of event-driven tasks people use javascript for.

    If you aren't writing higher order functions in javascript (functions that take functions as values or return them as values) you aren't fluent in javascript and aren't qualified to pass judgment on it.

  • by Jane Q. Public ( 1010737 ) on Saturday February 01, 2014 @02:15PM (#46129149)

    "We would truly be better off without JavaScript, without NoSQL, without Ruby on Rails, and without the hipsters."

    It's all very well and good to have opinions, but you make some strong specific complaints here without actually giving reasons for those opinions. Many people disagree with you.

    What is your problem with JavaScript? JavaScript DOES, in fact, have some very serious problems. For a classic example that was linked to here just yesterday, try

    [5, 10, 1].sort();

    I happen to share your dislike for JavaScript, but I can give actual reasons for having that opinion.

    NoSQL has its problems as well. [theregister.co.uk] While for some narrow uses it does offer great performance, if you step outside those narrow bounds even a little bit, you are forced to code many of the functions normally handled by a relational database, manually. I have never had to implement a huge distributed high-performance database, so in my case the NoSQL use-case is limited to very simple local non-relational data stores. But again, I can articulate a reason for not caring for it: the theoretical basis for it is weak, what actually constitute proper use-cases for it are rare, and it creates a lot of manual coding that relational databases handle on their own.

    But now we come to Ruby and Rails (which are 2 different things). Yes, Ruby is a dynamic language, with all the (well-known) shortcomings of dynamic languages. But other than that, what do you have against them? Please be specific. We already know you don't like them. The question is: why?

  • Re:Replusive (Score:4, Interesting)

    by Jane Q. Public ( 1010737 ) on Saturday February 01, 2014 @02:21PM (#46129193)

    "Why are some developers obsessed with performance? The user probably isn't. They don't care whether something loads 2 seconds quicker, or whether something has beautifully concise code."

    Although I am a programmer, I am also a "user". And from purely a user perspective: I sure as hell DO care.

    Slow programs are slow. Computers are supposed to wait on people, not the other way around.

  • Re:Replusive (Score:2, Interesting)

    by StripedCow ( 776465 ) on Saturday February 01, 2014 @02:26PM (#46129221)

    You are modded funny, but if this really is a joke, then there certainly is some melancholic undertone to it.

    The web is being developed for "the average" developer that just wants to get things done. This is a pity. Because if the web were developed for the advanced developer (read: computer scientist), those developers could lift the web to a higher level, and there would be much more traction.

    We just have to wait until Javascript gets sufficiently powerful to function as an intermediate language.
    From that moment on, we can have other languages targeted to the web. E.g., Python, Haskell, you name it.

    Right now, it is possible to use Javascript as an intermediate language using the ASM.js subset (what a name, what a concept), and there are actually projects that do stuff along these lines, but still, performance suffers a lot in this area. Perhaps a better approach is Google's NaCl, where intermediate code is translated more directly to native code, while putting security guarantees in place. But here, of course, cross-platform support is an issue.

    Perhaps then a hybrid between NaCl and ASM.js would be the best approach. That is, a compiler back-end that can target both NaCl *and* ASM.js.

    Time will tell...

  • by tranquilidad ( 1994300 ) on Saturday February 01, 2014 @02:35PM (#46129257)

    I started back in 1978 and I remember someone coming in to pitch a database technology in 2006 for which they had patents pending and it would replace relational databases. They kept describing it using catch phrases and turning rows into columns and I just couldn't grasp WTF they were talking about. I finally asked them to draw a picture and they mapped it out on the white board.

    I then asked if they had ever read about IMS and hierarchical databases. They had not. I wished them good luck on their patents and sent them packing.

  • by Anonymous Coward on Saturday February 01, 2014 @05:37PM (#46130235)

    The problem is JavaScript was only really designed to do small simple things, but just like the shitpile that is X86 it's been extended and kludged in ways that I'm sure the creators never intended or imagined and nowadays it is being used to run game engines, database engines, emulators and virtual machines!

    The fact that you NEED a browser with a good JIT to visit JavaScript-heavy pages without responsiveness turning to molasses just shows how out of control things have gone.

    It's only because we have such a ridiculous excess of CPU power that people can get away with this; It's bad enough that the web is so polluted with crap that it would take several minutes for the average web page to load over a modem or non-G3/LTE phone, but that we need accelerated or highly clocked CPUs and craptons of memory just to be able to render and run many pages makes me want to scream!

"Call immediately. Time is running out. We both need to do something monstrous before we die." -- Message from Ralph Steadman to Hunter Thompson