nedbat,
@nedbat@hachyderm.io avatar

A common question: what's the difference between a script and a program?

  • A program is something you've put some thought into.
  • A script is something you didn't think you had to put any thought into.
yantor3d,
@yantor3d@mograph.social avatar

@nedbat A script is a temporary fix that the entire project/business relies on and is saved on someone's desktop.

A program has a temporary fix that the entire project/business relies on and was labeled "TODO: Fix" by someone who left the company years ago.

SkipHuffman,
@SkipHuffman@astrodon.social avatar

@nedbat a script doesn't have bugs, it has unintended use cases.

aaribaud,
@aaribaud@piaille.fr avatar

@nedbat Luckily, etymology comes to the rescue.

  • program: from the greek pro (before) and gramma/graphein (write), meaning "written before".

  • script: from the latin scriptum/scribere, meaning "written".

So... Basically the same unless someone decides they should bear different meanings because opinion.

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@nedbat Every “script” is a “real program” that’s looked down upon by its self-deprecating author or its snobby viewers as unworthy of a higher standard of care. Both fail to recognize that if it’s load-bearing, it’s worthy.

/cc @davidgerard

smurthys,
@smurthys@hachyderm.io avatar

@nedbat

Script: Only the original writer can make it work

Program: Someone other than the original writer can make it work. Maybe. Sometimes.

btaroli,
@btaroli@federate.social avatar

deleted_by_author

  • Loading...
  • will_r_s_hansen,
    @will_r_s_hansen@mastodon.online avatar

    @btaroli @nedbat

    Nah. There's moments when you realize your quick Python script has become a not-quick-at-all Python program.

    purpletwiglet,

    @nedbat I always thought the difference between a script and a program is:

    • A script is never finished you just stop working on it.

    • A program is never finished you just stop working on it.

    brunus,
    @brunus@mamot.fr avatar

    @purpletwiglet @nedbat

    Even early Basic lines are programs...with ugly goto insctructions.
    About Python :
    If functions and/or classes, then, program.
    no functions or/and no classes : script

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines