3

Possible Duplicate:
Where does the word “pragma” come from?

I know that pragma commands are used to pass compiler specific directives to a compiler implementation, but why was the keyword pragma chosen? What is its etymology? Most language keywords are taken from real words, but pragma seems only to be defined within the context of programming.

Community
  • 1
  • 1
Ryan Michela
  • 8,284
  • 5
  • 33
  • 47
  • 1
    Wikitionary might be the best you can get: http://en.wiktionary.org/wiki/pragma – wkl Feb 02 '11 at 22:58
  • 2
    Duplicate question: http://stackoverflow.com/questions/3791259/where-does-the-word-pragma-come-from – payne Feb 02 '11 at 23:02

1 Answers1

1

I don't know exactly what the thought processes were behind it, but "pragma" comes from the ancient Greek word πραγμα, which means something like "action". It's also the root of the English words "pragmatic" and "practical". In other words, a #pragma directive is an action that the compiler should take, but it's also "pragmatic" and "practical", i.e., the sort of practical, pragmatic violation of the purity of the standard that you kind of need in the real world.

(I suppose this off-the-cuff etymology is close enough? Kinda makes sense to me, at any rate.)

Ken Smith
  • 20,305
  • 15
  • 100
  • 147