Slashdot Mirror


JavaScript Creator Talks About the Future

mikejuk writes "JavaScript is currently an important language — possibly the most important of all the languages at this point in time. So an impromptu talk at JSConf given by the creator of JavaScript, Brendan Eich, is not something to ignore. He seems to be a worried about the way committees define languages and wants ordinary JavaScript programmers to get involved."

11 of 305 comments (clear)

  1. Most important of all? by jaymz2k4 · · Score: 5, Insightful

    possibly the most important of all the languages at this point in time

    Not so sure I'd agree with that summary - I don't doubt the importance of JavaScript to the modern internet but I'd be more inclined to consider the C's of this world as the main foundation of the industry.

    --
    jaymz
    1. Re:Most important of all? by mhh91 · · Score: 5, Insightful

      C (and its derivatives) power almost all web servers in use today, and without servers, there's no web. Most browsers are written in C++ today, JS saw the light of day working inside browsers. A lot of programming languages have their main implementations written in C (Ruby, Python, PHP). So, yes, C/C++ are still important in the days of the web.

    2. Re:Most important of all? by jepaton · · Score: 5, Insightful

      Virtually every device has substantial amounts of code written in C or C++. Javascript would be useless on the microcontroller I write C code for. If C and C++ were to vanish overnight we'd be back in the stone age. I won't comment on whether C and C++ belong in the stone age, but it's great that many programmers don't have to think at the lower levels of machine abstraction.

    3. Re:Most important of all? by VortexCortex · · Score: 5, Insightful

      C isn't web scale.

      I'm not sure if you're going for funny or not -- Just to clarify, CGI was traditionally done via C. Apache is written in C. To this day, I still write processor intensive server side code in C or C++ (with a few C libs to support cross platform code & CGI) -- Even dinky hosing services like 1&1 offer remote SSH, have C/C++ compilers installed (G++, GCC), as well as GIT.

      I wouldn't develop on any system that doesn't at least support this minimal setup -- for web development or otherwise...

      Perhaps you mean C isn't a cross platform client side sand-boxed language?
      Neither is JavaScript:

      It's not cross platform -- The amount of conditional cruft you have to add to ATTEMPT a cross-browser solution is rediculous, so much so that there are entire libraries and frameworks for client side JS just to get most of the way there, and even then, some browsers are left behind.

      It's not sand-boxed -- Modern browsers compile JS to machine code and run that... Because the language requires features that make it slow, to do it any other way (bytecode in a VM), is terribly slow.

      I use JS, but it's not all it's cracked up to be... Most devs I know only use it as a client side language because it's available -- not because the language is so great.

    4. Re:Most important of all? by anonymov · · Score: 5, Insightful

      It's not cross platform -- The amount of conditional cruft you have to add to ATTEMPT a cross-browser solution is rediculous

      That's not the problem of javascript - that's the problem of implementation. Do you really think it would be any better if someone invented SomeBetterScript back then - and then MS made EvenBettererScript, which would be almost, but not completely, unlike the SomeBetterScript, and then Mozilla added their own extensions, and then other browsers implemented those extensions in incompatible way, adding some of their own in process, and ...

      You see what I'm talking about? JS by itself is quite nice language - web client bindings for JS is awful thanks to all the implementors.

      And yes, libraries and frameworks are good thing and they do make browser JS crossplatform - think about how AWT/Swing/SWT makes Java crossplatform and what would happen if you had to have your own bindings and workarounds.

      It's not sand-boxed -- Modern browsers compile JS to machine code and run that.

      And that's pure bullshit. "Compile to machine code and run that" has nothing to do with sandboxing - that's what all the languages that give a bit of concern about performance do, after all. Please come back when you learn the difference between "sandboxing vs non-sandboxing" and "interpreting vs JIT compiling".

    5. Re:Most important of all? by DiegoBravo · · Score: 5, Insightful

      > If C and C++ were to vanish overnight we'd be back in the stone age.

      If COBOL were to vanish overnight, C programmers wouldn't get their paychecks; that's stone age...

  2. Wait until you fix your first Node.js disaster. by Anonymous Coward · · Score: 5, Insightful

    Just wait until you've had to fix your first Node.js and MongoDB disaster. I'm working with one client to get rid of such a system. It is by far one of the worst gigs I've ever had, and I've had to clean up a whole lot of stupid shit before.

    JavaScript barely works as a client-side scripting language, and even then the experience is totally shitty for developers and users alike. Slashdot is a really good example of how JavaScript can absolutely fuck up a site unnecessarily.

    But it has absolutely no place for server-side development. It's just not up to the task in any way. It's missing basic language features necessary for large-scale server-side development. Its development tools are atrocious. Its runtime performance is horrible. Node.js is fucking stupid, and that's putting it nicely. Using it to query a data store is an extremely idiotic idea. All in all, it's a massive failure.

    JavaScript "programmers" have put together some of the worst and most broken systems that I've ever dealt with, and I've been dealing with horrible systems written using languages like PHP, Visual Basic, PowerBuilder and Perl. JavaScript may be one of the biggest computing disasters of all time.

  3. Re:Enough pussy-footing ... by fygment · · Score: 5, Funny

    ... how do you really feel?

    --
    "Consensus" in science is _always_ a political construct.
  4. Re:Javascript is a disaster by roman_mir · · Score: 5, Informative

    Javascript doesn't have types to speak of

    str = "10" + 2; - becomes "102"
    num = 10 + 2; - becomes 12
    num = 10 + 2 + "2"; - becomes 14

    num = "10" - 3; - becomes 7
    num = 10 / "2"; - becomes 5
    num = "2" * 4; - becomes 8

    num = 35.00;
    str = "VALUE IS: " + num; - this becomes "VALUE IS 35".

    --

    Sure, it's a bit strange, but nothing extraordinary.

    ---

    No scope to speak of

    well, it's not true really. In the following example x will have global scope and y will be local to its function:

    x=2;
    function test() {
        y = x + 3;
    }

    --

    no real notion of classes

    function Person(name, gender) {
            this.gender = gender;
            this.language;
            this.name;
            this.toString = function() {
                    return '' + this.gender + ' ' + language;
            };
    }

    Person.prototype.getName = function() {
            return this.name;
    };

    var person = new Person('Bob', 'male');
    person.language = 'English'; ...

    person.gender - this is 'male'
    person.language - this is 'English'.
    person.toString() - this is 'male English'.
    person.getName() - this is 'Bob'.
    --

    Of-course you can also just evaluate a string into a class on the fly, few language allow that:
    eval('
    var person = {
            name: "Bob",
            gender: "male",
            toString: function () {
                    return this.name + " " + this.gender;;
            }
    }
    ');

    person.name - this is 'Bob'
    person.gender - this is 'male'.
    person.toString() - this is 'Bob male'.

    No inheritance

    - well, there is the keyword "inherits" and it does allow an object to be extended and you can use the 'prototype' to have multiple inheritance.

    --
    I am not saying this language is wonderful, whatever, but saying it is lacking various features, that it clearly has, even though they look different from other languages... it's disingenuous.

    As to the question whether this language has anything that others do not, again, how about on the fly reflection via evaluation of strings into objects? When I first saw that over a decade ago, I thought it was a neat concept then, I still think it's a neat concept today.

  5. Re:Javascript is a disaster by maraist · · Score: 5, Interesting

    ""+" doesn't append _two numbers_, but it can append _number to string_ - which you can have in any language with operator overloading."
    function foo(x,y) { return x + y; }
    foo("5",6) == "56"

    In every other language I've seen, the CORRECTly expected result is 11 or error. Perl, C++, etc. The point is that you can never trust your input if you are expecting numeric.

    You must guard the inputs with explicit (and thus inefficient/unreadable casts). If you're using a 3rd party library, you'll be pulling you hair out trying to figure out what went wrong.

    The language is full of such wtf's. While you can happily redefine most core operations (e.g. how jQuery fixes IE), you can't overload the + operator. Call my cynical, but I don't like languages that let you corrupt basic building blocks.

    That being said, javascript is excellent at what it was designed for - and passable for what it's currently used for, but I fear for the future if it's the basis of future industrial strength applications.

    One place I WOULD like to see it extended is DB's.. CouchDB has a very nice java-script based map-reduce framework - it leads to concise and expressive code (that's really NASTY if plsql, etc are used).

    Basically javascript is excellent fragment-code. But HORRIBLE for modular libraries - having to write an entire library (like jquery) in a scoped wrapper then assigned to a mutable/corruptable symbol is sick. (Especially since library A will mutate library B without permission - hello 1970s!!)

    --
    -Michael
  6. Re:Just typical JavaScript ignorance. by itsdapead · · Score: 5, Insightful

    JavaScript isn't even that important to the modern Internet. It's pretty isolated to the Web,

    Yup, and the web isn't very important to the modern Internet at all.

    and even there it's only seriously used by a small number of sites.

    Just a few tiny, insignificant ones like Slashdot, Google (Docs/Maps/GMail) and any other website that contains anything more interactive than a form submit button. Except the ones that use Flash (but then the ActionScript language used by Flash developers is a superset of ECMAScript.) - or Java, which really is "only used seriously by a small number of sites" (for given values of "small" and "seriously").

    Its also the only game in town if you want to target iOS, Android and desktop browsers with the same codebase. Meanwhile, Java's star seems to be falling, .Net/C#/VB (however well respected) are effectively Microsoft-only.

    For every line of JavaScript in a given web site, there will be hundreds, if not thousands, of lines of C or C++ code doing the real work within the JavaScript interpreter

    Well, yes, that will be true of any "scripting" language.

    The statement in TFA that Javascript is "possibly the most important of all the languages" is flamebait, but your position is equally absurd.

    The "contest" is probably Javascript vs. Python/Ruby/Perl/PHP. ("CoffeeScript", mentioned in TFA seems to be an effort to make JavaScript look more like the first three of those to appease the haters of curly brackets - where's the campaign to make Javascript look more like PHP, I ask !? :-) ).

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.