[haiku-development] Re: Scripting languages

  • From: Sean Healy <jalopeura@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 16 May 2011 13:14:15 +0100

On 14-May-11 15:14, Donn Cave wrote:

Not an argument, but an argumentative question - what does "scripting
language" mean?

I mean what the community in general refers to when it uses the term "scripting language". This may sound circular, but I'm studying linguistics and I lean to the descriptivist school of thought: things mean what the speech community uses them to mean.

In general, I consider a scripting language one in which a program's source code is stored as text, rather than as a sequence of binary codes.

I would have picked bash (and awk and sed) to be the only languages
that meet my definition, on Haiku, inasmuch as they're used for what
you might call UNIX scripting.  I don't know of any use of an application
scripting language on Haiku, like ARexx on the Amiga.

Judging by the wikipedia article [1], most people using the term do not use it so strictly. I'm not a student of the history of computer science, but it seems that even in the early days, what you're referring to were called "batch languages" or "job control languages". Back when I was doing mainframe programming, in my company we called them "batch jobs".

(I guess technically speaking, a "batch job" was the process that was running, not the script itself, but we were somewhat flexible in our usage.)

In any case, I would consider these types of languages to be a less powerful subset of scripting languages, and not suitable targets for the bindings.

[1] http://en.wikipedia.org/wiki/Scripting_language (I know Wikipedia is not a great source for many things, but speaking as a descriptivist, it's usually a pretty good source for how terms are actually used by the speech community.)

The languages on your list so far are interpreted, is that it?  But
look out when you start trying to pin this one down (want to talk
about whether Java is interpreted?)  If it matters for some reason,
that the language is interpreted or not, then focus on that reason.

In general, yes, a scripting language is interpreted rather than compiled. Since the code is stored as text and not as machine code, it cannot be run without interpretation.

(Although Perl, for example, has a two-stage process in which the script is compiled into a sequence of bytes; this sequence of bytes is what is run through the interpreter proper. It's even possible to output this sequence, store it, and load it directly later, for situations where running from the script is too slow.)

I consider Java and similar languages to lie somewhere between scripting languages and ordinary programming languages. They are compiled to a binary format, but it is not native machine code, and still needs an interpreter to run it.

I have BeOS API bindings for GHC Haskell.  I don't care what you
mean by it, Haskell is certainly no scripting language, but is it
relevant to your project?

I've never used Haskell, but as it has a compiler that compiles the program to native machine code, I would not categorize it as a scripting language. I would certainly be willing to consider it as target for the project, though, especially as the interest has been seconded.

Even though the project was originally intended to allow scripting languages to access the Haiku API, that is because I assumed that those languages would be the most suitable targets. I assumed (apparently wrongly) that if someone were going to be using a compiled language, they'd just use C++ and have direct access to the API.

The emphasis of the project is more on the "allowing access" part than the "scripting languages" part. However, the criteria of community interest and ease of writing extensions apply.

Can you point me to any documentation on how to enable access to a C++ API from Haskell?

The list of potential target languages is now:

Lua
Haskell
Perl
Python
Ruby
Scheme
Squirrel

Other related posts: