|
|
|
|
|
by roestava
5358 days ago
|
|
Inter-operating between processes is difficult and may be inefficient. That's why languages try to call each other's libraries within the same process. By embedding Ruby or Python within the Java Virtual Machine or the .NET CLR you start your program/library with a single process. For instance, Ruby by default didn't have great concurrency so users ended up spawning more processes to handle amongst other things concurrency. JRuby's selling point is that you don't have to work with so many processes and you can instead rely on the battle-tested multithreading of the JVM. It opens up the chance for more bugs when using threads, but you do cut on the need to use so many processes. Besides, scripting languages have always made it easier to string together a program for testing, managing and prototyping. Not only do you not need to spend time recompiling programs in scripting languages, but you also have more freedom regarding your code. Java for instance demands one class per file. With a scripting language, you can have as many as you want. With a scripting language you don't need a Makefile as it's easier to use just a few files to get your job done. Now you could question the need to have so many different scripting languages. But you could also question the need to have so many different non-scripting languages as well. |
|