Jump to content

Nonprocedural language

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 76.173.30.165 (talk) at 06:13, 1 November 2010. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

NPL (for NonProcedural Language) was a relational database language developed by T.D. Truitt et al.[1][2] in 1980 for Apple II and MS-DOS. Modern languages such as Visual Basic or Java are called non-procedural or event-driven, languages because instead of writing a series of sequential instructions, a programmer defines the actions that the program must perform when certain events occur.

The artificial intelligence languages, so called in the old days, such as LISP and PROLOG, are also considered to be non-procedural although the case for LISP a bit murky since the pure LISP is supposed to be a functional language.

Someone needs to fix this entry. A language such as Visual Basic or Java is procedural because the elements of the language are used to create step-by-step procedures or instructions that the computer will follow. A non-procedural language is does not consist of steps or sequence, but represents a state. HTML, XML, SQL and Microsoft LINQ represent the category of non-procedural languages. An example from computer history would be RPG, the Report Program Generator. The name of this languange, RPG, gives one a hint as to the functioning of a non-procedural language. To be specific, the computer must process the non-procedural source into executable instructions. The non-procdural source does not specify how the computer is to produce the output. That is left to the author(s) of the language processor. For example, a variety of language processors share the responsibility to generate a dynamic web page from the various source files. Some of these source files may be procedural, i.e. JavaScript, and others may be non-procedural, e.g. XHTML.

As far as references are concerned, almost any up-to-date programming book will agree with me. One reference you can quote is Deitel and Deitel Visual Basic 2010 .Net How to Program.

Also, it is wrong to equate non-procedural with event-driven. Event-driven languages interact with underlying operating system support to respond efficiently to user generated events. The event-response model is extended to also respond to system generated events, such as an attempt to divide by zero, and custom user coded events. Custom events often extend the error handling features of a programming environment. The event handling code is almost always procedural. This is true for Java, C++, C#, Visual Basic and other event-driven languages. I don't know much about LISP and PROLOG so I can't talk about those languages.

Notes and references

  1. ^ "An Introduction to Nonprocedural Languages Using NPL", T.D. Truitt et al., McGraw-Hill 1983.
  2. ^ Truitt, T. D. "NPL: the nonprogrammer's data base language" Computer Language 4(06) June 1987 pp97-103