The difference between a script and a program is one is a subset of another. A program is typically a piece of text that contains instructions. A script is a program that is interpreted in real time and then turns it into a lower level language. Of course, that leaves java, which isn't a script language, in a fuzzy definition.

I agree that one is a subset of the other, but differ in your idea of what constitutes a script. To me, a program (in the computer programming sense) is a sequence of instructions for a computer to execute. These instructions can be in any form, assembly, C, Perl, byte code, whatever. A script is exactly the same thing but bent towards the human side of readability rather the computer side of readability. Scripts are most often higher-level languages because of this and I think the idea that "scripts are interpretted in real time" falls out of this merely as a matter of consequence. The higher-level the language the greater it's scriptiness

If I created a C interpretter would the C programs I write for it suddenly be scripts? I don't think so. By your definition they would be. Scriptness is innate in the language, not the implementation. So, Java programs are also Java scripts in this sense. But that's just my opinion

I think the whole idea of "script" vs "program" is sort of meaningless these days though. In the old days it meant interpretted vs. compiled, but that dichotomy has gotten fuzzier with time.


In reply to Re: Re: Script or program? by duff
in thread Script or program? by jeffpflueger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.