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."

42 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 thetoadwarrior · · Score: 2, Funny

      C isn't web scale.

    2. 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.

    3. 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.

    4. 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.

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

      "At this point in time" however, the Cs are just doing the same as what they have been doing for decades, whereas JavaScript is becoming a more and more important part of rich, highly cross platform applications. C is good for that too, of course, but it tends to just be a part of the background implementation just now. It is generally not a driving force or limiting factor in how we choose to implement high level applications, whereas JavaScript is.

      Already other comments are streaming in (dynamically via JavaScript!) pointing out how basically all devices have software written in C at some level. I know this, the submitter probably knows it, and it doesn't change which is more important right now. For example, JavaScript has done more for making Linux viable on the desktop than C or Java ever has. So many apps these days can be written as web apps, and run on any OS and any hardware, as long as they have a decent web browser. It is currently changing, and will continue to change how we use our computing devices.

      --
      which is totally what she said
    6. 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".

    7. Re:Most important of all? by Anonymous Coward · · Score: 3, Funny

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

      Uuum, C/C++ is the stone age!
      If one would have written that stuff today instead of in the stone age, one would use the radical cool new language of today: Haskell.

    8. Re:Most important of all? by BenoitRen · · Score: 2

      And yes, libraries and frameworks are good thing

      I disagree. The web browser has to parse all of that JavaScript every time it loads a page with JavaScript that requires it. In most cases it's not even really necessary, as the JavaScript only uses a couple library functions that could easily be written by yourself (like XmlHttpRequest).

    9. Re:Most important of all? by xTantrum · · Score: 2

      mod u up. Must have been a web developer who summarized the article. It's so irritating to me with the advent of web 2.0, that everyone is so focused on the web. Not the internet, the web. As a result i feel like innovation and creativity have been lost in a sea of AJAX, PHP scripts and social networks. I'm very sad to see the commercialization of the internet and seeing us so focused on just this one aspect of computing - which is really just the GUI to the net. I'm hoping thinks like the Kinect will stir things up and bring along some much needed spice in this quagmire of hodgepodge technologies hacked togeter to create a pretty face. As for the person who summarized the article. C my sig.

      --
      $action = empty(PHP) ? backToC() : unset(PHP) ; "when the concrete cases are understood, the abstractions are readily
    10. 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...

    11. Re:Most important of all? by binarylarry · · Score: 4, Funny

      Haskell will lose it's cool when someone writes a real program in it and not just code examples.

      --
      Mod me down, my New Earth Global Warmingist friends!
  2. i still hate it by Torvac · · Score: 2

    its incomplete and stupid at so many parts. i still wait for script type=text/lua or text/python

  3. Just typical JavaScript ignorance. by Anonymous Coward · · Score: 3, Insightful

    JavaScript isn't even that important to the modern Internet. It's pretty isolated to the Web, and even there it's only seriously used by a small number of sites. It just gets a lot of undeserved hype.

    Indeed, C and its derivatives and related languages are in fact the main foundation of virtually all software. 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, the web browser, the client's OS, the routers between the client and server, the server's OS, the web server, the back-end web app (or the language it's implemented in), the back-end database server, and so forth.

    1. 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.
  4. fix JavaScript, please by t2t10 · · Score: 2

    While I generally don't like stuff coming out ouf technical committees, sometimes the alternative is worse... like in the case of JavaScript.

  5. Javascript is a disaster by mlwmohawk · · Score: 2, Insightful

    The problem with javascript is that it is one of the WORST languages and environments. I dare to say Brandan owes the whole industry a great big apology. If he were japanese, there is a traditional act he should perform. Javascript doesn't have types to speak of, doesn't handle numbers very well, I mean seriously "+" appends two numbers? No scope to speak of. It looks object oriented, but has no real notion of classes. No inheritance. All of the features that have made languages "safer" and "easier" to program in, javascript lacks. I can't think of one innovative or positive aspect of javascript, and lament that it is, alas, the only option at this point. Visual Basic is a better language, and I hate VB too.

    Javascript is a hack by a person who didn't know better and we are stuck with it. I shake my head. For decades people have been creating new computer languages. ruby, java, perl, erlang, c++, c, pascal, basic, cobol, fortran, etc. All of these had an objective, to allow some some form of expressiveness or simplicity. Yet, javascript is on all the browsers. Irony for sure.

    1. Re:Javascript is a disaster by TheRaven64 · · Score: 4, Informative

      It looks object oriented, but has no real notion of classes. No inheritance.

      I agree with most of your points, but not this one. Class based and object oriented are orthogonal. Simula was class based, but not object oriented. JavaScript and Self are object oriented, but not class based. And JavaScript does have inheritance, a reduced form of the same differential inheritance that Self has (only one parent, can only be assigned at construction time). New objects inherit from the object in the prototype field of the constructor object.

      --
      I am TheRaven on Soylent News
    2. Re:Javascript is a disaster by ltmon · · Score: 2

      I really don't think you understand Javascript quite enough to be commenting this strongly on it.

      It does have types, to speak of and to use. They are in the spec, they are in the language, they work. http://bclary.com/2004/11/07/#a-
      Since when has "+" appended 2 numbers? When they are strings I would imagine, which is exactly what most languages do. You might need to get your head around javascript types to stop this happening.
      Javascript has scope -- it's quite well defined.
      Object oriented does not mean classes, there are other ways of doing it. In particular, the prototype pattern which is followed by javascript. It can have inheritance because of this pattern also.

      Javascript has been an ECMA standard for the last 15 years, and cannot be thought of as a one-person hack in any way.

      I shake my head.

    3. 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.

    4. 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
    5. Re:Javascript is a disaster by roman_mir · · Score: 2

      and more :)

      num = 10 + 2 + "2"; - becomes 122

      and the corrected "Person " functions is:

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

      missed 'this.' before 'language' in the 'toString'.

      Oooh well.

    6. Re:Javascript is a disaster by gbutler69 · · Score: 2

      Two objects that have always contained numerical values, were assigned numerical values, are treated as strings. You always have to explicitly cast them as numbers. Which is bogus. Just the typing alone hurts my fingers.

      Bu-u-u-llshit! Try the following

      var i = 1; var j = 2; alert ( "This is a test : " + ( i + j ) );

      --
      Over-the-top Response Guy! Giving "Over-the-Top Responses" since 1970.
    7. Re:Javascript is a disaster by Paradise+Pete · · Score: 2

      It's not a syntax error. A genuine syntax error would have saved you early. Instead it's a bug waiting to happen. And the only reason it's a bug is that javascript is so effed up. having Global be the default scope within a function is just plain crazy.

    8. Re:Javascript is a disaster by jc42 · · Score: 2

      If you think Javascript is weird, try executing this in C: "123"+1

      What's weird about that? It clearly produces a pointer to that '2' in the middle of the quoted string. Isn't that what any sane programmer would expect? ;-)

      One of my favorite C examples is a variant on the above:

      i = 257 & 0x0F;
      c = "0123456789ABCDEF"[i];

      Actually, my main comment about such examples is that, if you can't instantly explain what each is doing (and why the second is safe), I'd be nervous about hiring you for a C project. Unfortunately, most of the people doing such hiring can't explain either of these examples, which explains a lot of why we get so much crappy code from the computer industry.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    9. Re:Javascript is a disaster by Animats · · Score: 2

      ""+" doesn't append _two numbers_, but it can append _number to string_ 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.

      It's also wrong in Python, in an even worse way. The problem began with using "+" for concatenation. Concatenation works on sequences, so [1,2] + [3,4] in Python is [1,2,3,4], which is not what one might expect. Worse, Python has both sequences and numeric arrays (as part of the standard NumPy math package), and numeric arrays have different semantics. Adding numeric arrays with "+" has numerical semantics - you get a vector addition. Still worse, mixed mode addition between sequences and numeric arrays is allowed. (Discovering the semantics of that is left to the reader.)

      Then this was generalized to multiplication. In Python, "[1,2] * 2" is [1,2,1,2]. Ulp.

      This is a non-trivial design error in Python. Python functions are essentially generic, This allows some functions designed for scalars to generalize to complex numbers and vectors. It's thus quite reasonable for someone to use either a list of numbers or a numeric array as an argument to the same function. That produces unexpected results, often without raising an error exception.

      This is one of the standard language designer errors. The other classic is not putting in a "bool" type at the beginning. Retrofitting one later never quite works right, because mixed-mode integer and bool semantics get ugly. C and Python both retrofitted bool types, and the dents still show. Mathematically, for Booleans, "+" should be OR, and "*" should be AND. If you don't like that, they should be errors. In Python, "True + True" is 2.

    10. Re:Javascript is a disaster by shutdown+-p+now · · Score: 2

      Pretty sure that inheritance is actually part of the definition of OO

      It's not. It's part of definition of class-based OO, but there's also prototype-based OO (which JS belongs to), and other more exotic schemes.

      in fact java is not seen as pure OO because it dissalows multiple inheritance.

      I've no idea where you've got that one from. Java is not seen as pure OO for the sole reason that not all of its values are objects - it also has primitive types such as "int" and "float", values of which aren't objects, which do not participate in type relations etc.

      In contrast, in e.g. Python every int is an object (implementation-wise it's optimized, of course, so writing a literal 123 does not actually allocate anything on the heap), so Python is purely OO.

  6. Readability by Timmmm · · Score: 2

    When did it become acceptable to have the content take up only 1/4 of the page width?

  7. The community is worse than the language. by Anonymous Coward · · Score: 2, Interesting

    While the JavaScript language, development environments and implementations are absolutely terrible, as I see you're well aware, those are not the worst parts of it all. By far, the community is the most atrocious thing related to JavaScript. The people are generally nice enough, but my gosh, are they ever ignorant when it comes to computing.

    JavaScript tends to drive away everyone who is even remotely a good programmer, as such people can usually see just how flawed JavaScript is, and they want nothing to do with it. So what we have left over is a bunch of non-skilled "programmers" who think they know what they're talking about, but in reality have absolutely no clue. They continually produce some of the shittiest code that has ever been written.

    The scariest part is how they want to start getting involved with server-side development. This was typically one area of web development were good developers could use good technologies to get the job done well. But now the JavaScript community has put together very half-assed Erlang clones like Node.js, and have been hyping them as viable server-side technologies (when they clearly aren't). This is going to be a huge disaster, caused solely by the ignorance of the JavaScript community, and those who are foolish enough to hire such people to develop software.

  8. Re:I have a suggestion. by mikael_j · · Score: 3

    Yes, I just re-read what I've been posting here and I'm not sure what exactly I was trying to argue. I'm going to blame my hangover and the fact that I spent several days last week battling datetime handling in JavaScript (which I will maintain is an abomination simply on the grounds of not supporting ISO-8601 formatted dates in a world where everything else uses ISO-8601).

    I'm actually baffled by the fact that I managed to crank out two posts before realizing that I was rambling incoherently. Now I'm going to go drink some water and try to make my headache go away...

    --
    Greylisting is to SMTP as NAT is to IPv4
  9. 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.

    1. Re:Wait until you fix your first Node.js disaster. by Anonymous Coward · · Score: 2

      here here! had similar experiences in my career - completely agree.

  10. Re:I have a suggestion. by bunratty · · Score: 3, Informative

    You're arguing for value semantics (as in C++), as opposed to reference semantics (as in Java, Python, and JavaScript). In the latter languages, what many programmers think of as objects are really references to objects. In your code, myObj and newObj are two references that point to the same single object. Don't feel bad -- I talk to many Java programmers who still don't quite grasp this concept. Good old pointer diagrams make it clear; get a book that shows references as boxes with arrows that point to the objects they refer to.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  11. Re:Enough pussy-footing ... by fygment · · Score: 5, Funny

    ... how do you really feel?

    --
    "Consensus" in science is _always_ a political construct.
  12. Re:I have a suggestion. by dr2chase · · Score: 2

    Yes, but (speaking as a language designer and implementer, and this problem is a big one) you more or less admit that the program doesn't stand on its own ("Good old pointer diagrams make it clear"). One problem with programming languages is that they are often designed by compiler writers or interpreter writers, for whom such pointy data structures are ever-so-useful, but in the so-called real world, by-value is much more often the case. "Value" is also much more useful when you set out to do things in non-micro-managed parallel; anything shared and mutable gives you the ability to observe Before and After, and sometimes your program depends on that.

  13. Re:Perfect example of popularity over quality by Lennie · · Score: 2, Insightful

    Most of what is bad about JavaScript isn't so much the language, but the environment. People still drag their IE6 on to the internet and they expect things to work and it seems many website builders try to oblige them. They work around the problems in that 10 year old software. Many things have changed since then.

    I do not know what you do, but let's say you are a Java programmer, when you code do you always keep in the back of your mind it should still work on the 1.3 runtimes from 10 years ago ? And do you check/test it too ?

    If you are a C-programmer developing programs which run on Linux, you always create 2 code paths ? One which compiles and runs on Linux 2.2.x/gcc 2.95.x ? And some #ifdef where you take advantage of the newer features which Linux and other modern operating systems offer you ?

    Or do your programs still compile against the libraries of KDE3 ? QT from before 3.0 ? Or the GTK1.2 ? And do you test this ? And regularly ?

    So yes, there is some cruft. That doesn't mean the newer stuff can be exciting to people.

    The HTML5 and other new specifications has a lot of good things in it, the WHATWG was specifically created to create a new specification for creating applications, which has now grown into the HTML5-specification as it is now. JavaScript it self has some really interresting properties.

    --
    New things are always on the horizon
  14. Crockford on JavaScript by aixylinux · · Score: 2

    I don't see where anyone has yet mentioned Doug Crockford's excellent videos on JavaScript. These are all on YUI theater. http://developer.yahoo.com/yui/theater/ All the criticisms mentioned here are discussed in depth. Crockford deals with the good and bad parts of JavaScript from the perspective of years of detailed research on it. And like it or no, JS is available in a useful, common subset on all modern browsers. The whole HTML, CSS, DOM, JavaScript ball of wax is a kludge that happened by the chaos of historic accident. But we are stuck with them, and Crockford's notions of how to do JS right are worth your time in viewing the videos.

  15. Re:Thank you for your ignorance. by jc42 · · Score: 2

    Why measure importance based on bits transferred, what about time spent? ... I think human minutes is a better measure of importance than bits transferred.

    Well, maybe, but we should be careful with such comparisons. It strikes me as similar to the common practice among management of measuring programmer productivity by counting the number of lines of code produced. It's hard to imagine any worse measure that lines of code, but "time spent" could be a good challenger. Do we really want to encourage management to measure our productivity by time spent?

    After using JS on any number of projects, I'd have to say that the time I spent versus the useful results has generally been among the lowest of any of the several dozen programming languages that I'm fluent in. This isn't the fault of the language itself, of course; it's the fault of the turkeys that introduced all the niggling little incompatibilities in the JS in the most-used browsers. And the computer biz has a way of encouraging vendors to do just this. For "local" languages (like C), this may be just a minor annoyance, but the primary reason for JS's existence is to provide a way of downloading code that runs in the client's browser. If you need different code for different browsers, your language has failed at its primary task. The java people understood this, but the folks who brought us JS clearly didn't. Either that, or they introduced all those incompatibilities with malice aforethought, intentionally wasting my time trying to write JS that runs the same everywhere.

    A good replacement for JS would be a language designed explicitly to minimize the time spent by all the web developers who currently are being bogged down by the difficulty of making even the simplest JS script work the same everywhere.

    My general approach is to delay the use of JS as long as possible. In my experience, once you introduce JS to a project, the time to get anything running correctly goes up by orders of magnitude. So if you can find an acceptable way of providing the content without using JS, it's a big win for everyone.

    --
    Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  16. Re:Web browser/server by Teckla · · Score: 2

    Apache Tomcat is written with Java.

    And it runs on a JVM written in C/C++.

  17. Re:Slashdot was better without JavaScript. by jc42 · · Score: 2

    Since your comment was so entertaining, perhaps you will tell us why you won't subscribe, if it doesn't come down to simple incompetence.

    It wasn't my comment that you replied to, but I can explain why I don't subscribe to a lot of sites that I read regularly. One of the main reasons is that my file of sites/logins/passwords has grown to over 200 entries, and I'm starting to consider this a major security issue. Someone who gets their hands on this file could become a real PITA in my life. So I'm looking for ways to minimize the possible damage from this incoherent pile of security data.

    The most obvious way is by minimizing its size. I no longer create logins casually; I ask myself whether this new request to make up a login id and password is really all that important to my life. Usually the answer is "No."

    I do have a /. login, which I created back when my pile of logins was much smaller than it is now. If I were to run across /. today for the first time, there's a good chance that I wouldn't create an account here. Yeah, it's fun to comment (or flame or whatever), but it's not actually all that important to my life. I can understand why someone else might take the same attitude, even if they're a regular reader. I'm a regular reader of lots of sites where I don't have an account.

    --
    Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  18. Design by commitee vs. design by guru by Animats · · Score: 4, Interesting

    The C++ standards committee has been lost in template la-la land for the last decade. They've focused on features understood by few and used correctly in production code by fewer. Since the discovery that the C++ template system could be abused as a term-rewriting system to perform arbitrary computations at run-time, that concept has received far too much attention. It's an ugly way to program, but it's "l33t". On the other hand, they've been unable to fix any of the fundamental safety problems in the language. C++ is unique among mainstream languages in providing hiding ("abstraction") without memory safety. (C has neither, Simula, Pascal, Ada, Java, Delphi, Erlang, Haskell, Go, and all the "scripting languages" have both.) So there's an example of a committee screwing up.

    On the Python side, we have von Rossum. The problem there is that he likes features that are easy to implement in his CPython implementation, which is a naive interpreter, even if they inhibit most attempts at optimization. As a result, Python isn't much faster than it was a decade ago, and is still about 60x slower than C. Attempts to speed it up have either failed or resulted in insanely complex, yet still sluggish, implementations. So that's the "guru" approach.

  19. And they say Apple has a reality distortion field by itsdapead · · Score: 4, Insightful

    BitTorrent traffic alone far outweighs Web traffic.

    ...and many people locate the BitTorrent they want to use by searching on the web.

    Then there are more traditional uses like FTP

    ...and many people locate the file they want to download by FTP by following a link on a web site (assuming they don't download it using HTTP).

    and email.

    Which many people now access via a webmail application such as Gmail or Outlook Web Access - and while they aren't going to supplant email anytime soon, people are increasingly using social networking sites like Facebook and Twitter to communicate.

    Voice and video teleconferencing are always becoming more prevalent. Then there's also gaming.

    ...and people don't use the web at all to locate people, find game servers, find out about games or even play them on line?

    Don't forget DNS. And there are many other more technical uses that I know you won't be familiar with.

    Actually, I've been using the Internet since before the web existed, and I've even written POP and SMTP clients in lovingly hand-crafted C so cut the patronising crap - I do actually know the difference between the web and the Internet. The argument was whether the Web was an important part of the Internet - not whether it was the only use.

    Sites that use Flash and/or JavaScript heavily tend to be rather useless. Slashdot has gotten progressively worse to use as more JavaScript has been introduced.

    OTOH, sites like Google Maps and Docs use it to great effect. I'd agree that Slashdot is a less than stellar example (and I'm not quite sure why it needs so much scripting to do what it does).

    Likewise, Flash doesn't really add anything useful to the table.

    Vector graphics and object-based animation that scale nicely without having to be coded from scratch? Its particularly suitable for things like online tests and educational applets. Again, it can be abused by using it for things that could/should be done in plain old HTML - and its use it for animated/interactive ads may be annoying, but that doesn't make it insignificant. Plus, all the people flaming iOS because it doesn't support Flash presumably think its good for something. For my money, it ought to be replaced by HTML5+SVG+DOM+CSS+AJAX+Javascript in the long term, but the development tools aren't there yet.

    We could download and play games long before Flash existed.

    In a format that would run unmodified on Windows, Mac, Linux on some mobile devices? Well, yes, there is Java - although I've found Flash to be more consistent cross-platform and easier to deliver (the plug-in is a simple download which most people already have, and its trivial to package Flash as stand alone .exe or .app files that run without plugins) and Flash's graphics engine is perfect for simple 2d games. Java may be better for complex stuff Minecraft, but if I wanted to write a poker app I'd choose Flash (until/unless SVG is properly supported across browsers). Plus, Flash is biggest in "on line" games like Farmville, which are tied to web-based social networking.

    We could stream videos using RealPlayer and other technologies long before YouTube existed. In fact, those real applications are often much effective to use than the Flash- or JavaScript-based "equivalents".

    Sometimes the issue is not just technical. Macromedia/Adobe give away the player plug-in, make their money selling tools to content creators and only bug users when an update to the player is available. RealPlayer were continually trying to push their premium media player software and content on your users. You could tell users to go install Flash player without them coming back and asking if they had to pay (because Real had made the "Free Playe

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