Advertisement

"Scripting languages"

Started by September 03, 2011 03:08 PM
21 comments, last by ddn3 13 years ago
The local IT press has recently taken a break from evangelizing cloud computing and "noSQL" as the second coming of Christ to push their new favorite fad: "scripting languages." Allegedly, "scripting languages" are "easier to work with" than "other languages" and are generally awesome in a generic, not-quite-specified way. Of course, I got intrigued about these "scripting languages" - what are they, and why are they so awesome?

Evangelists of "scripting languages" tend to name Javascript, PHP and Python as examples of new, awesome scripting languages, relegating Java and the .NET languages to the status as old, boring and "hard to work with." So, what exactly is a scripting languages?

At first glance, could it be an interpreted language? Apparently not, because compilers exist for both PHP and Python, and all of the three "scripting language" poster children also have implementations using JIT compilation. Meanwhile, both Java and the .NET languages is commonly executed through bytecode interpretation, and REPL interpreters are integral to working with F# or Haskell.

Perhaps it's dynamic typing? After all, dynamic typing is supposed to totally awesome for increasing productivity. Turns out, C# supports dynamic types and Erlang, which I doubt anyone would call a "scripting language," is completely dynamically typed. Weak typing doesn't seem to be it either, as Python employs strong typing.

So what I'm trying to say here is that the term "scripting language" annoys me because it seems to be synonymous with "a language I think is cool and modern." Can anyone else come up with a good, consistent definition of "scripting language?"

So, what exactly is a scripting languages?

Not C, C++, Java, C#.

This is how they are defined.

Erlang, Haskell, OCaml, Lua and such do not count, since they do not exist as far as mainstream programming world is concerned.


The distinctions here also matter only for commodity programming. There is very little money involved, a fraction of a percent, compared to software industry in general. So the bikeshed principle applies.
Advertisement
Funny enough, Java used to be a "scripting language"

Funny enough, Java used to be a "scripting language"


I wouldn't say so.

JavaScript was named as such precisely to sell scripting language in a world that didn't feel comfortable with them by riding Sun's push of Java.

Maybe at some point someone tried to push Java itself as scripting language, but the market didn't want to have any of it. What was indeed a problem was that Java was interpreted at very start, which is something that still shows up on rare occasion, but isn't the same thing.
The term more than likely has its roots back in the days of Unix command line scripting where you could throw a bunch of commands in a file and then have the shell execute it without the tedious compile-link step which existed in languages of the time such as C.

Languages typically assigned this status these days provide much the same functionality, throwing commands in a file to run, but are more often than not executed by VMs embedded in programs; Lua and Python would be good examples here and both very popular in the games industry for their 'scripting' abilities.

Usage cases also define the languages to some degree; building upon the above quick turn around such languages are used to 'script' events in games, providing a flow to events which could be quickly edited. Importantly this editing could be done by "non-programmers" or even trivially generated by tools.

As with most things they are nothing new; just someone somewhere has decide that they want to push them for some reason... although I seem tor recall much hype happing around 5 years back as well... it's all cycles after all...
I would define a script as a piece of source code that is retrieved by an another program then compiled or interpreted by that program to extend the program at runtime.

A scripting language is a language that is primarily used as an extension to another program.

I personally don't think scripting languages are "more awesome" than other languages. They have their advantages and disadvantages. I wouldn't want to develop a larger application using a scripting language nor would I ever build a anything that requires heavy processing.
My current game project Platform RPG
Advertisement
Scripting languages are languages which have their own built in compiler and interpreter, IMO. Thus the ability to dynamically create, compile and execute code for them (often called scripts), vs pre-compiled languages which export a single monolithic executable or library. Lua, Python, C#, Java all fall in that domain. Many people use C# as a scripting language, Unity for instance. Scripting languages have gone far beyond being just extension language, a niche they still fill. Python makes up the backbone of Eve a massive MMO over 300,000 players. Performance wise they can rival straight C, LuaJit for instance is competitive on many numeric benchmarks. I think it's just a natural evolution of programming languages. They play a big role in the web world, Javascript , PHP, Python, Ruby for instance.



-ddn

Thus the ability to dynamically create, compile and execute code for them (often called scripts), vs pre-compiled languages which export a single monolithic executable or library. Lua, Python, C#, Java all fall in that domain.

This is possible and sometimes done in assembly, C and C++ as well.

C and C++ go even one step further, they give you this functionality for free with every application, just know which stack frame to smash.

A scripting language is a language that is primarily used as an extension to another program.[/quote]

Yet entire web development, based entirely on "scripting" languages, uses only standalone applications. At most, the http server will be a standalone process, but that is optional and back-end can typically run on its own.

[quote name='ddn3' timestamp='1315075639' post='4857227']
Thus the ability to dynamically create, compile and execute code for them (often called scripts), vs pre-compiled languages which export a single monolithic executable or library. Lua, Python, C#, Java all fall in that domain.

This is possible and sometimes done in assembly, C and C++ as well.

C and C++ go even one step further, they give you this functionality for free with every application, just know which stack frame to smash.

A scripting language is a language that is primarily used as an extension to another program.[/quote]

Yet entire web development, based entirely on "scripting" languages, uses only standalone applications. At most, the http server will be a standalone process, but that is optional and back-end can typically run on its own.
[/quote]

Web apps tend to either extend the webserver (php for example) or the webbrowser (javascript), the client is never really a standalone application for a webapp(a web app runs in the browser) and for the server its fairly rare (When standalone apps are used serverside those are most commonly written using Java in my experience),

I would consider it more accurate to say that Language X is used as a scripting language in Application Y than to say that Language X is a scripting language. (Any language can be used as a scripting language, some languages might be more suitable for this job than others though)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
I thought a scripting language was just a specific form of commands in a programming-language-like-syntax. Basically it looked like a language, but was interpreted by a high-level language during run-time. They could be used in games to code logic for a.i. (as an example) and watch the differences take place without having to compile again.
I'm that imaginary number in the parabola of life.

This topic is closed to new replies.

Advertisement