Design flaws of Javascript

Asked

Viewed 141 times

-1

In a world where there are strongly typed languages like C++, Java or Pascal, why still Javascript is used despite all its flaws (such as lack of scope per block and exaggerated ease of creating global variables)?

  • 3

    That sounds like a question for a college job...

  • 5

    Matheus, welcome to Stackoverflow! This site exists to provide answers to concrete code problems. More general discussions do not fit here as questions. It may be a subject for chat but as question is out of topic. So if there’s a bug, post here that we give a help.

  • 1

    Thank you Sergio.

  • And since when absence of scope per block is a failure?

  • 2

    Matheus, the question was closed because it is not suitable to the format of the site. But you can edit the question, making it more specific and less subjective (I strongly recommend reading Good subjective, bad subjective). If you can turn it into something that can be answered in a few paragraphs, I’m sure several users will vote to reopen (I include!).

  • The question is more than two years old, but it is worth a comment: Absence of scope per block alone is not the decision criterion. Global creation facility, by itself, also not. Strong or not types are usually insufficient for choice. Also (already answered), as JS is the only true client-side option, it is necessary to use anyway. Java has problems, C++ is too bureaucratic for some contexts, pascal has problems too. Misconceptions give wrong notion of the values relevant to choice. Need to analyze the whole set.

Show 1 more comment

1 answer

1

Because javascript is the only client-side programming language. And with common sense it is possible to create amazing web applications.

  • 5

    I agree, but the answer is complex and goes beyond that, because javascript tends to be also widely used in server-side with initiatives like Node.js

  • 1

    Exactly! We could talk about several subjects related to the JS language, but it’s not worth it.

  • There are other languages for client side. Flash is not dead yet, and there are languages built on Javascript.

  • @Renan, could you tell me which languages are built on Javascript?

  • @Philippegioseffi here is a list (in no way exhaustive) of them: https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS some, such as coffeescript, are made to be used client-side.

  • I saw little of Coffeescript, looked unintentionally in jsFiddle and appeared the option, but haven’t seen the background syntax, benefits and etc. Anyway, thanks.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.