Search code examples
assemblyscriptingcompilationinterpreterlow-level

Scripting vs. Coding


What is the difference between scripting and coding? I've done both, I can recognize both, but it seems in reality, the definitions are sketchy. First of all, am I right in assuming if you are "coding", your "code" must (be able to) compile into some system's machine or assembly, be it x86 assembly, windows assembly (like MASM), micro-controller assembly, etc. ? Am I also right to assume scripting doesn't ever compile, it's text is just run through a processing program like 'Microsoft Windows Based Script Host' (VB-Script parser)? I get some of the qualities of scripts and code, but on their lowest level, I'm confused about their compilation. Also, I assume if a script gets turned into some form of binary, but is not being processed by the OS or computer (or microcomputer) itself, it's still a script. Am I right? I know code can be 'compiled' into non runnable "libraries", and some scripting languages can run other script files.


Solution

  • You are probably right in that the definition of 'scripting' is vague. I think the original term stems from a different era when software was always written in compiled languages such as C or Pascal and then possibly customized or automated in high level languages ('scripting languages', such as VBA).

    Today, however, entire systems can be written non-compiled languages. Actually, this goes all the way back to at least 1987, HyperCard allowed application developers to create entire business desktop applications in a scripting language, and in later versions parts of the scripts could be compiled to machine code.

    Conversely, some applications are now customized or automated in compiled languages. Consider for example MS office applications that could be automated in .NET (VB / C# are compiled languages).

    Additionally, non-compiled languages are usually no longer interpreted, but instead JITed. This means that the distinction between a non-compiled language and a compiled language is blurred.

    So, in short, I think the definition depends on context. In most cases where I have used the term, I refer to 'scripting' as automating or customizing (in code) applications created by someone else without modifying said application.

    In Masterminds of Programming, Roberto Ierusalimschy writes the following when asked to describe the language:

    Lua is a scripting language in the original meaning of the expression. A language to control other components, usually written in another language.

    I really like that definition.