Hacker News new | ask | show | jobs
by orting 4468 days ago
> node is different, in that bizarre though js may be, if you have to use it in the browser, there is a kind of logic to using it on the server as well.

I don thinkt that makes any sense. Should we also use js to implement the OS for the server? If js is good for server-side use it, if not use something else.

My main issues with php is that I dont trust the language and standard libraries to behave as I expect. There are simply to many strange type conversions, silent errors and strange behaviour going on.

1 comments

> I don thinkt that makes any sense. Should we also use js to implement the OS for the server?

We don't normally develop the OS ourselves, so what language it was written in is irrelevant. Same goes for runtimes, libraries, etc. If we're not responsible for maintaining it, it should not matter what language it was written in. Naturally, the "same language on client and server" argument can only apply to code we develop and maintain.

My argument was badly put.

What is the benefit of using the same language on the client and server? That the developer only needs to know one language?

The server-side code you write has to interact both with the client and the underlying OS. So you should consider how language X interacts with both client and OS, in addition to the intrinsic qualities of the language.

If we adopt a modular approach to software development, then I don't see any universal benefit to using the same language for all modules.

js might be a good server-side language, but choosing it because it works on the client is the wrong reason.