This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I must say I don't really like any of the definitions Google comes up with. The closest to a one-line definition I can think up is: A language that is not compiled, or where the result of the compilation is not kept long term.
The fact that it's a purely technical definition -that says nothing about usage of the language- speaks volumes about how scripting languages have grown in capability.
Ulf Dittmer wrote:I must say I don't really like any of the definitions Google comes up with. The closest to a one-line definition I can think up is: A language that is not compiled, or where the result of the compilation is not kept long term.
Could you please give an example for where the result of the compilation is not kept long term? Which language?
Thanks!
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Ulf Dittmer wrote:I must say I don't really like any of the definitions Google comes up with. The closest to a one-line definition I can think up is: A language that is not compiled, or where the result of the compilation is not kept long term.
Could you please give an example for where the result of the compilation is not kept long term? Which language?
Thanks!
.class
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35438
9
posted
0
Abimaran Kugathasan wrote:Could you please give an example for where the result of the compilation is not kept long term? Which language?
Perl and TCL use compilers that generate native code at runtime. But that native code is not stored, and thus thrown away when the process is terminated. That's what I mean by "long term" - after the process terminates.
Devesh H Rao wrote:.class
Java is actually a mixed case. Source files are compiled into class files, and those are kept around long term. And then the bytecode contained in class files is usually compiled again at runtime into native code, but that native code is thrown away when the JVM terminates.
Ulf Dittmer wrote:
Java is actually a mixed case. Source files are compiled into class files, and those are kept around long term. And then the bytecode contained in class files is usually compiled again at runtime into native code, but that native code is thrown away when the JVM terminates.
But, the Java stores the compilation output for long time. So, why do you thing it's a mixed case? I think, it's a programming language according to your above definition.
By saying "the result of the compilation", the definition assumes that there is just one compilation phase, and the entire result of that one phase is kept long-term. In Java, however, there is an initial compilation for which the results are kept, and subsequent JIT compilation for which the results are not kept. So I agree with Ulf; it's a mixed case.
I think, IMHO, etc. that the "compiled vs interpreted" distinction stopped being useful towards the end of last century. It was a popular theological argument at programmer's bar room bull sessions, but meaningless in the real world.
I'm not even sure that the "scripting language" distinction is meaningful anymore. Does the phrase have value as anything other than a put-down: You are not a real programmer, you just use a scripting language.
I do believe that there is a great value in lightweight languages that don't require a ton of boilerplate to get working to do simple tasks. Perl is a classic good example of that, at least early versions of Perl. But Perl has gotten a lot more powerful and has added is own boilerplate.
One can have a nice bar room discussion over what makes a lightweight language. Once upon a time, Java was lightweight, the language itself was tiny, and the runtime libraries were small and concise. Of course, it evolved, with the language adding "features" that made the Java manual grow and the explanations become far more complex, just as the number of libraries expanded exponentially. Sadly, very few of the initial libraries have been deleted, so the whole of the language and the libraries just keeps growing. One easy example: the Date class in Java is a joke. Yet nearly all programs use it, JDBC uses it, and the replacements, such as Calendar, are not complete.
Pat Farrell wrote:I'm not even sure that the "scripting language" distinction is meaningful anymore. Does the phrase have value as anything other than a put-down: You are not a real programmer, you just use a scripting language.
I don't know about a put-down. I'd call something a "scripting language" if one primarily uses it for controlling other applications (first definition in David's link).
I've written scripts using Java, but mostly I use it to create applications, so to me, it isn't a scripting language. Even when it was 1.0, I thought of Java as a "programming language".
I've been using Python to create scripts lately, so to me, it is a "scripting language". Except when I write Python programs. Then it's a "programming language".
Joe Ess wrote:
I've been using Python to create scripts lately, so to me, it is a "scripting language". Except when I write Python programs. Then it's a "programming language".
Agreed++. IMHO, whether something is a scripting language or not really depends on what you are doing with it. The distinction of whether the language is compiled or not, used to be a representation of whether a language is to be used for scripting or not, but not anymore. Other distinctions that also used to represent, but not anymore, are whether the language is "strongly typed" or "loosely type", or whether it has regular expressions support or not.
Henry Wong wrote: or whether it has regular expressions support or not.
I will argue that Java the language does not have regular expression support; no more than Fortran or Cobol has regex support. The usual library for Java includes regex support, but the language does not. You have to use explicit subroutine calls to do anything regex.
A "scripting" language is a type of computer programming language. Anything which includes the ability to write sequential, iterative and conditional statements is a computer programming language. XSL is a programming language for example.