Miranda (programming language): Difference between revisions

Content deleted Content added
m Added second comma to delimit appositive
Line 35:
Miranda is a [[lazy evaluation|lazy]], [[functional programming|purely functional]] programming language. That is, it lacks [[Side effect (computer science)|side effect]]s and [[imperative programming]] features. A Miranda program (called a ''script'') is a set of [[equation]]s that define various mathematical [[function (mathematics)|function]]s and [[algebraic data type]]s. The word ''[[set (mathematics)|set]]'' is important here: the order of the equations is, in general, irrelevant, and there is no need to define an entity prior to its use.
 
Since the [[parsing]] algorithm makes intelligent use of [[off-side rule|layout]] (indentation), there is rarely a need for bracketing statements and no statement terminators are required. This feature, inspired by [[ISWIM]], is also used in [[occam (programming language)|occam]] and [[Haskell (programming language)|Haskell]] and was later popularized by [[Python (programming language)|Python]].
 
[[Comment (computer programming)|Comment]]ary is introduced into regular scripts by the characters <code>||</code> and continue to the end of the same line. An alternative commenting convention affects an entire source code file, known as a "[[Literate programming|literate script]]", in which every line is considered a comment unless it starts with a <code>&gt;</code> sign.