Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Keeping this on the frontpage will help as well :)

This is a great idea. One of the reasons why JavaScript is frequently misunderstood is because if you search for anything JS related you will find posts explaining how to do some DHTML thing in IE5/6 and Netscape.

It's great that Mozilla considers themselves to be the patron saints of JS, but much of the recent growth in the JS community is due to projects like V8 and node. Why doesn't Joyent or Google get to host the docs on their servers?

Perhaps it's a better idea to establish a Javascript Foundation that runs javascript.org or something. This approach will probably not last and then it'll be a wasted SEO effort.



I am one who doesn't really understand javascript hype (and have used it in advanced ways), there are few types, objects are automatically converted to strings, few functions support even for the web (urlparse). I am in favor of a VM to the web, supporting more programming languages.


I'd be interested to know by what standards you asses programing languages.

JavaScript has an admittedly clumsy and unnecessarily Java-like syntax and few built-in functions, I agree. But underneath there is a very elegant functional programming language. Who needs more built-in functions? Most scripting languages' built-in functions are just libraries written in that very language anyway. There's tons of such libraries for JavaScript.

A lot of the recent hype is due to node.js, too. Node.js is (somewhat simplified) a set of evented IO bindings for the V8 JavaScript engine. Those bindings enable us to build webservers using JavaScript. JavaScript was designed to be run in an event loop without any concurrency or blocking, which makes it incredibly easy to build software the scales reasonably well.

That said, I do agree that you should be able to use more languages in the browser. IIRC somebody has already ported Mono to Firefox which allows you to run tons of scripting languages in the browser. The next thing we need is standardization.


Calling Javascript a functional language is quite a stretch. All native data structures are mutable, the function literal syntax is extremely clumsy, and there is no algebraic datatypes, pattern matching or TCO.


Having JavaScript on the server side makes me a bit weary, because of the difficulties of developing with it on the user side well mainly the no compilation/type checking and lack of concurrency. With the push to multi-processor systems concurrency is becoming much more important to take advantage of which makes me curious how does a non concurrent loop scale well (I don't know much about this node.js library).

On the user side however I have learned to like it. The lack of type checking does bug me since I tend to make cludgy spelling errors which compilers pick up, but its tolerable. I do wish js had a built in type checker for development.

Another driver of hype, more negative hype is GWT. But it is a bit disappointment and is a wrong approach to the whole browser independence issues. My brother and I have been working on a project for over 4 months, which initially started with using GWT and after two month of struggling with it, we threw it out, and switched to JQuerry. Our productivity instantly shot up.

More language support would certainly interesting, but I agree JS standardization across browsers is a more important issue to have resolved.


Concurrency is not much of an issue, you write concurrent JS apps like you write them in other languages.

There are three types of applications, and two are easy in JavaScript.

The first is something that is well within the capabilities of one modern CPU core. This class of applications includes every program that's currently running on your machine. Servers that only do IO (message queues? memcache? SMTP?) can also be included, in many cases.

This is easy to handle because there is no concurrency. For IO, you use an event loop, of course.

The second class of application is something like Facebook. One machine will never be enough to handle it, so you design for it to be as distributed as possible. Each app is "shared nothing" and passes messages to communicate with other components.

Obviously, JavaScript will do fine here. Each tiny component runs on one CPU core, and then you run a million copies of the app on 250,000 4-core servers. Easy. Need to double capacity? Just buy more servers. Wonderful.

The third case is the Enterprise Application. This is something like your company's HR portal or your online bank. It's an application that's the swiss-army-knife of applications. It slices, dices, and reads email too. Just compiling it is a week-long process involving 10 engineers and 4 consultants. For maximum SPEEEEED, everything happens in its own threads, which share 100% of everything with the other threads. (How could you read email and RSS feeds and check your paycheck if there weren't threads!?)

This type of app can only ever run on a single machine; if it's too slow, IBM and Oracle would be happy to help you out with a marginally-faster box for a few million more dollars. Since everything is shared, once you hit the most expensive hardware, that's the best you can ever do. If you wonder why it takes 120 seconds to load your bank account balance... this kind of app is why.

And no, you can't write one of these in JavaScript. Shared-state threads are not implemented. What a loss...


Taking advantage of multi-core platforms is easy. Just start multiple node processes and have the kernel take care of the rest. If you want the processes to communicate, there's a host of tried and tested IPC methods available.

The advantage of this approach is that when you write a function in Javascript, it is guaranteed that no other program other than the very function you are writing will modify your data in any way.

I've used GWT on a big project for about half a year. It's not over-hyped. It definitely has it's space. If you're working on a project with two people, you're just not in the market for it. GWT is all about stability, optimization and structured development. I don't want to get into too much detail here, but some optimizations that GWT gives you are impossible to achieve by writing JS code manually.


I asses all types of programming languages.


If Google wants to write some better docs, that’s their prerogative. MDC has good docs that exist, today.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: