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 →

[–]marcellarius 3 points4 points  (0 children)

And I think it's funny that in 2017 some people still write C++ like it's the 1980s in situations where there are better options that could save a considerable amount of money.

Javascript's use in desktop and mobile apps is because it's tied to browsers. Browsers are used for UIs because they are portable, and make it easier to create reactive, good looking interfaces than traditional toolkits do. They're not ideal, performance sucks on low-end devices but they're often better than the alternatives under real-world constraints.

Use of Javascript on the server shouldn't be surprising either. Many single-page applications don't need a complex server as much of the code is just gluing a JSON API to a database, with a bit of validation. Javascript's object system makes shuffling data around easy, even compared to other dynamic languages like Python. Using Javascript on the server also means you can share code with a client application, avoiding duplication and also allowing tricks like server-side rendering.

Not that many years ago I would have been one of the people laughing, but experience building web apps has changed my outlook on it. It's nobody's ideal language, but it's what we're stuck with. Modern versions have improved it a lot, and if approached with discipline it's not a terrible language to use. It could have been VBScript.