5 Replies - 687 Views - Last Post: 19 August 2017 - 02:02 AM Rate Topic: -----

#1 SSB96  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-August 17

script language vs. programming language

Posted 17 August 2017 - 06:40 PM

Hey I'm shawn and i am new to programming. I was just wondering if someone could explain in depth the difference between scripting and a programming language. Thanks in advanced!!
Is This A Good Question/Topic? 0
  • +

Replies To: script language vs. programming language

#2 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10681
  • View blog
  • Posts: 18,294
  • Joined: 19-March 11

Re: script language vs. programming language

Posted 17 August 2017 - 08:59 PM

It's pretty much a distinction without a difference, if you ask me. It goes way back to the '80s, when you had "real languages" like C that you'd use to write big applications that needed to be compiled and linked and so forth, and you had "scripting languages" like bash and awk and sed for writing little local utilities for sysadmin tasks or filesystem maintenance or power editing or whatnot. Then Larry Wall produced Perl, which was originally designed to replace the scripting languages and put all of the sysadmin's toolkit into one language - sort of a swiss army knife language. While Perl's not a truly great language - I haven't seen the latest revisions, but the language that I learned way back when was renowned for cryptic and unmaintainable code - it did demonstrate that it was possible for a language to bridge the gap between "programming languages" and "scripting languages". It was possible to bang together a little perl script to munge messy text into usable form, and it was also possible to write nontrivial code to solve sizable problems.
Again, not trying to make a case for Perl in 2017, it had a lot of problems and it's not in common use today because other languages ate its lunch, but once Perl happened, the "scripting" versus "programming" distinction was shown to be an artifact of coincidence.

So, that being said, the usual read on it has "scripting languages" being small wonky languages made for small problems. They were usually very domainy, eg, bash was for messing with the file system and sed and awk were for text manipulation and so forth, and they typically had pretty idiosyncratic syntax and peculiar design decisions, at least in part because their development was usually not taken very seriously. They were also, and this is somewhat counterintuitive, considered to be easier for users to pick up and mess around with, partly because their syntax was thought to be friendlier and mostly because, as interpreted languages, they allowed the user to just write something and fire it up, there was no fussing around with compilation and linking and whatnot.

"Programming languages" on the other hand, were treated very seriously. They were either generalized power tools for solving big problems on the limited hardware of the time, or they were academic curiosities designed for eggheads to play with (thinking here of the lisps and ML, mostly). They were thought to have a steeper learning curve and to be, generally speaking, the playground of the Serious Hackers.

So basically, it's a status thing - a dick-measuring contest, to put it crudely. The high-status people declared their preferred toolset to be the high-status toolset, and they looked at the tools used by their support staff - the sysadmins who kept their machines running, for example - as lesser tools for lesser fools.

Fortunately, this is less common now. Today, we look down on languages for reasonable reasons, like for example if they're PHP.
Was This Post Helpful? 2
  • +
  • -

#3 baavgai  Icon User is online

  • Dreaming Coder
  • member icon


Reputation: 6979
  • View blog
  • Posts: 14,600
  • Joined: 16-October 07

Re: script language vs. programming language

Posted 18 August 2017 - 06:56 AM

jon.kiparsky pretty much covered it. For a short version, I suppose you could call it a function of number of steps. Basically, does the code get compiled to executable machine code that's then executed: programming or compiled language. Or, does the code get run by another program: scripting or interpreted language.

Note, there are a few grey areas here. Java, for instance, "compiles" to "bytecode." However, while this is optimized code, it is either interpreted or executed in the Java Virtual Machine, depending on your perspective. Further, a number of scripting languages will actually go through a process like this to arrive at a more optimized p-code version. Few would call Java a scripting language, but it does depend on what definitions you're working from.

Perhaps a better definition for scripting languages is a language where the code itself must be present. You can ship java JVM code, or .NET CIL ( or whatever they're calling it these days) code, without source. Javascript, on the other hand, will always be visible, at least in some form.
Was This Post Helpful? 1
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10681
  • View blog
  • Posts: 18,294
  • Joined: 19-March 11

Re: script language vs. programming language

Posted 18 August 2017 - 10:55 AM

So if I look at it this way, maybe it helps: "scripting language" is a feature that a language can have. A language is a "scripting language" if it supports rapid development of small programs for immediate and local use. Typically, then, a scripting language would have the following features:
(1) high-level - we don't want to write scripts that care about machine memory locations
(2) highly domain aware - we want a language that knows how to do the stuff we want to do, out of the box
(3) easily executed, preferably as a single step to execute
(4) low-boilerplate - you're doing a small thing fast, you don't want to be thinking about stuff you don't care about

So basically, most languages that you're going to come across these days are going to work fine as scripting languages. Java is probably the last major language which doesn't meet these criteria
Was This Post Helpful? 1
  • +
  • -

#5 SSB96  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-August 17

Re: script language vs. programming language

Posted 18 August 2017 - 11:03 AM

Thank for the replies. That clears up a lot.
Was This Post Helpful? 0
  • +
  • -

#6 baavgai  Icon User is online

  • Dreaming Coder
  • member icon


Reputation: 6979
  • View blog
  • Posts: 14,600
  • Joined: 16-October 07

Re: script language vs. programming language

Posted 19 August 2017 - 02:02 AM

Not that Java hasn't tried to get a scripting style environment for Java: http://www.beanshell.org/ It just never really caught on.

In contrast, the .NET scripting environment, PowerShell, is an integral part of the Microsoft ecosystem.

Curiously, any "programming language" that is popular enough will eventually offer something form scripting. You can argue the lower level guys, like C, are unsuitable, but that doesn't mean such things haven't been attempted.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1