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."
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
its incomplete and stupid at so many parts. i still wait for script type=text/lua or text/python
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.
While I generally don't like stuff coming out ouf technical committees, sometimes the alternative is worse... like in the case of JavaScript.
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.
When did it become acceptable to have the content take up only 1/4 of the page width?
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.
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
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.
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.
... how do you really feel?
"Consensus" in science is _always_ a political construct.
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.
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
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.
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.
Apache Tomcat is written with Java.
And it runs on a JVM written in C/C++.
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.
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.
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.