![]() | The topic of this articlemay not meet Wikipedia'sgeneral notability guideline. Please help to demonstrate the notability of the topic by citingreliable secondary sources that areindependent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to bemerged,redirected, ordeleted. Find sources: "Expression-oriented programming language" – news ·newspapers ·books ·scholar ·JSTOR(July 2022) (Learn how and when to remove this message) |
Anexpression-oriented programming language is aprogramming language in which every (or nearly every) construction is anexpression and thus yields a value.[1] The typical exceptions aremacro definitions,preprocessor commands, anddeclarations, which expression-oriented languages often treat asstatements.
Lisp[2] andALGOL 68 are expression-oriented languages.Pascal is not an expression-oriented language.
Allfunctional programming languages are expression-oriented.[3]
![]() | This article or sectionpossibly contains originalsynthesis. Source material shouldverifiably mention andrelate to the main topic. Relevant discussion may be found on thetalk page.(July 2022) (Learn how and when to remove this message) |
Critics, including language designers,[4][failed verification] blame expression-orientation for an entire class ofprogramming mistakes wherein a programmer accidentally codes anassignmentexpression, which replaces a variable with an expression rather than testing it forequality with that expression.
The designers ofAda andJava prevent this type of mistake by restrictingcontrol expressions to those that evaluate strictly to theboolean data type.[5][6]
The designers ofPython implemented assignment as a statement rather than an expression, thus prohibiting assignment from nesting inside any other statement or expression.[7] (Until version 3.8 added 'assignment expressions', with a different syntax.[8])
In some expression-oriented languages, expressions that merely causeside effects returnvoid types.
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Expression-oriented programming language" – news ·newspapers ·books ·scholar ·JSTOR(July 2022) (Learn how and when to remove this message) |
![]() | This sectionneeds expansion. You can help byadding to it.(February 2018) |