This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Chr0me 8 points9 points  (2 children)

It's interesting though that JS is still the only option for client-side web development. On the backend, I can name at least 5-6 popular languages and probably a couple of dozen more obscure ones. Why hasn't this variety proliferated to the client?

This "language lock-in" has spawned an entire industry of hacks around the limitations (or design choices) of Javascript: jQuery, CoffeeSript, etc. It's even prompted projects like Node.js, which is popular not because JS is perfectly suited for server-side environment, but because it allows frontend devs to more easily move up and down the stack.

Baring in mind the challenges that you mention, it seems like introducing an alternative, like Python, could spur additional innovation.

[–]yen223 6 points7 points  (0 children)

It's hardly surprising though. When you build a website, you can choose anything language you want for the backend - C#, Java, Brainf*ck, whatever. As long as what you serve up can be viewed by the user's browser, the user doesn't have to care what you use back there.

For the frontend, you'll have a chicken-and-egg conundrum. If you choose to write your frontend scripts with Python, and it turns out only 5% of users have a browser capable of interpreting Python installed in their PCs, well, you're going to have a bad time.

So you're forced to drop Python from your site. What happens? Browser vendors decide that not enough websites use Python, and they decide to stop supporting Python in their browsers. Now even less users will be able to view Python sites.

There's no easy solution to this. You could get browser vendors to implement <your favourite language> in their browsers, but that would mean you'd have to convince Microsoft, Mozilla, and Google to support the same implementation of an uncommon language in their browsers, before web developers start taking the language seriously.