0

Is AutoIt a programming language? What's the difference between a programming language and a scripting language.

AutoIt seems quite complex. There are a lot of things you can do in it. The code can even be compiled into an .exe file. So I don't understand why it wouldn't be considered a programming language.

neuromancer
  • 53,769
  • 78
  • 166
  • 223
  • 5
    The difference between "scripting" and "programming" languages mostly comes down to the purpose for which they were designed. There's a lot of crossover, it's not a clear distinction at all. – Greg Hewgill Jul 20 '10 at 19:13
  • 1
    Duplicate: http://stackoverflow.com/questions/101055/when-is-a-language-considered-a-scripting-language, http://stackoverflow.com/questions/599527/scripting-and-programming, http://stackoverflow.com/questions/3043401/what-is-difference-between-scripting-languages-and-other-languages-closed – gnovice Jul 20 '10 at 19:24
  • 1
    All script languages are programming languages but not all programming languages are script languages. – Copas Jul 20 '10 at 21:37

5 Answers5

4

A scripting language is a language that is not compiled, but interpreted real time.

All scripting languages are programming languages, but not all programming languages are scripting languages.

Matthew Vines
  • 27,253
  • 7
  • 76
  • 97
  • 1
    So LISP is a scripting language? – Skilldrick Jul 20 '10 at 19:33
  • 1
    I'm not well versed in LISP, but a quick search leads me to believe that it is a scripting language in some implementations, and a compiled language in others. – Matthew Vines Jul 20 '10 at 19:43
  • 1
    I'm also getting the sense that this definition of scripting language is not necessarily the standard. Though I do recall from my earlier CS courses back in the day many a test question about scripted vs compiled languages that followed this definition. – Matthew Vines Jul 20 '10 at 19:51
  • Sorry, looks like we're talking at cross-purposes. I would say that scripting languages and interpreted languages are two types of computer language, and that their venn diagrams overlap heavily, but they're not synonyms. I was citing LISP as an example of a language that is generally interpreted but not generally thought of as a scripting language. – Skilldrick Jul 20 '10 at 21:15
3

A pure scripting language can't exist on its own - it makes something else do something (like JavaScript manipulates web pages).

Some languages, like Python or Ruby or Perl, are called scripting languages because they have a lot in common with other scripting languages, but they can be used standalone.

AutoIt sounds like a normal scripting language:

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.

It sounds like its main purpose is for manipulating Windows GUI elements, so this makes it a scripting language. Would it make any sense on a web server, for example?

The important thing to note though, as Greg mentions, is that the term "Scripting language" is very poorly defined, doesn't really mean anything, and shouldn't be worried about.

Skilldrick
  • 69,215
  • 34
  • 177
  • 229
  • 3
    AutoIt can be used standalone. You can compile the scripts into standalone .exes that do not require the framework to be installed on the host pc. AutoIt can be used to write GUI interfaces, application installers, watchdog apps, web servers... It goes way beyond it's original design spec of being a GUI automation tool. – JohnForDummies Jul 21 '10 at 12:15
  • I don't mean standalone as in working without its framework - I mean standalone as in working in not needing an environment to work in (such as Windows GUI elements). But if you say it could be used to write a web server, then obviously it doesn't need GUI elements to work on in order to make sense, so that satisfies my definition of standalone! – Skilldrick Jul 21 '10 at 14:38
1

In many cases, scripting languages are programming languages. It certainly looks like AutoIt is.

The 'scripting' seems to be applied in this case because it is being used to automate GUI interaction, a common usage of the term.

µBio
  • 10,668
  • 6
  • 38
  • 56
0

I don't know anything about AutoIt, but to address your question about a programming language vs. a scripting language - Larry Wall put it very well in one of his State of the Onion addresses:

Suppose you went back to Ada Lovelace and asked her the difference between a script and a program. She'd probably look at you funny, then say something like: Well, a script is what you give the actors, but a program is what you give the audience. That Ada was one sharp lady...

If you're interested in reading more, http://www.perl.com/pub/a/2007/12/06/soto-11.html

Matthew J Morrison
  • 4,343
  • 3
  • 28
  • 45
-1

Scripting languages are Programming languages that use simple syntax (something similar to human language syntax)!

Programming languages syntax are normally similar to machine code!

So, since "AutoIt" is a programming language with simple syntax, thus it is considered a scripting language!

The problem with "AutoIt" is that it is a 100% interpreted Language, thus, it is a slow language too!

Why?

Because "AutoIt" does not convert its script file to "machine" code in order to the "cpu" understand it, so, the "cpu" will constantly need an "AutoIt" interpreter to translate the script, making all the process to slow!

loop, 1.000.000
var = var + a_index

The "AutoIt" interpreter must translate "var = var + a_index" to the "cpu" 1 million times! (the translation process is really slow!)

In the other hand, in compiled languages, all the script is converted to machine code, so, the "cpu" does not need an "interpreter" to execute the code, so no translation is required! (the loop above could be 1 million time faster in a compiled language than in an interpreted language!)

User
  • 71
  • 1
  • 7