-3

I am currently writing a memoire on the evolution of developing tools. Among them is of course the programming languages. I made some researches, and a lot of the most popular languages are scripts languages like Javascript, Python or Ruby But when comparing performances, they are not as efficient as VM languages or compiled languages.

I would like to be able to explain why, but all researches on the net returns answers about javascript only, while I want an explanation for scripts in general, I don't think it is a coincidence. I thought it was because they have a more simple syntax, but some other languages have some concise syntax.

So I am wondering why scripts ?

closed as primarily opinion-based by gnat, Thomas Junk, Greg Burghardt, BobDalgleish, Jörg W Mittag Jan 19 at 1:11

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    How do you define "script language"? What do you make of languages like Python which can run in their "official" interpreter (CPython), but also on other VMs such as the JVM (Jython)? – Vincent Savard Jan 17 at 20:33
  • 1
    Even if you could prove they are less performant (not all are), they are fast enough for most purposes. At that point, it becomes a question of how fast you can create what you want with that language. It's less about scripting and more about language design. – Berin Loritsch Jan 17 at 20:34
  • 1
    While this is not an answer, It is a fact that some scripting languages are not easy to maintain and cryptic too. Some computer people used to take pride in producing commands that are hard to figure out! An example is UNIX k-shell. The problem with such langs. is not only that they maybe slow, but also when they were invented, there was nothing you can write them with except text editor. No IDE. The exception to this is VBA. Another strange thing is that some good CASE tools died in favor or harder to use tools. The computer world is strange indeed. Who would have imagine JS to be at the top? – NoChance Jan 17 at 20:38
  • Easy to start, people very easily get involved into things which have lower threshold. After digging dipper they start come with different workarounds ... – Fabio Jan 17 at 20:41
  • A good classification of languages is here so that you use accurate terminology in your research:en.wikipedia.org/wiki/… – NoChance Jan 17 at 20:41
4

You are looking in the wrong direction:

But when comparing performances, they are not as efficient as VM languages or compiled languages.

The criterium you are using to answer this question is too narrow.

Performance - whatever you may subsume under this term - seems to be no criterium for popularity.

There are other factors:

  • Ease of development: Is it easy to teach/learn?

  • Developer "happiness": Since the advent of ruby we know how important that is

  • Is the language widely known? Is it easy to find people who could code in X?

  • Is there a wide ecosystem of tools, libraries, frameworks?

  • How proficient is the average developer with X?

  • Is it easy to do the things you want to do with the language?

These are only a few questions which could be asked.

There may be many more.

The answer to your question is: Because they offer a nice balanced package of pros and cons, which makes them attractive; and performance is not a dominating con.

2

Script languages and compiled languages have different purposes so it is pointless to compare them in terms of "better" or "efficient". Note that execution speed is very different from efficiency.

Script languages are typically command languages used to string up program modules in order to perform complex tasks. It is in the name: a script is a series of steps to be taken in order. Scripts never exist on their own, they always live in an environment that offers primitive functions that the script can invoke.

You can regard scripting as "programming for users", it allows them to use building blocks and get creative. A compiled language on the other hand is more suited for creating the blocks which are not modified that easily, should be more general purpose and typically have a longer life span.

There will always be more users of automated systems than creators of them so it is not surprising at all that scripting languages are more popular than compiled languages (popularity just means there are a lot of users). The higher-level the system, the more popular it typically will be.

1

Adding on to Thomas's excellent comment (I havent hit enough rep yet but i wanted to share a possible big reason).

Not only the available libraries, tools, and frameworks helping out with scripting. but also the many ways of deployment (and the problems you can solve fairly easy), combined with an active and contributing community can really drive a script language like JS.

This ofcourse will create a positive feedback loop, resulting in even more tools, libraries and frameworks. Which in turn will attract even more developers.

Not the answer you're looking for? Browse other questions tagged or ask your own question.