Question

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.

Was it helpful?

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.

OTHER TIPS

According to Wikipedia, http://en.wikipedia.org/wiki/Scripting_language, The main characteristics of scripting languages seem to be:

  1. used inside a runtime environment which it can control/automate

  2. interpreted

  3. very high level

  4. dynamic

With notes that sometimes that's how a particular language started out, before it was generalized. So some scripting languages are only called that for historical reasons. The "very high level" and "dynamic" parts are the criteria I hear people most often use when referring to something being scripting-language-like, so my guess is that's the most reliable indicator.

with respect to games:

coding - compile time generated. requires game dev environment to be available on the coders machine.

scripting - runtime interpretted. only requires the game to be available on thw scripters machine.

even that definition can be a bit grey if the scripting needs a game editor in order to create and process the scripts.

philosophically the difference was that scripters just automated the game via code in text files that are part of the games data and could therefore be added post game publishing as mods or dlc. now the environment is a lot more complex and scripter term is spmetimes interchangeable with coders.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top