We have a[n] "evaluation machine" and a[n] "execution machine". The formerInteresting. Imperative languages like C distinguish expressions and statements syntactically, but with various implicit conversions between them, e.g., expression-statements and procedures that execute statements but then return values. Haskell separates statements from expressions with the type system, and keeps them apart more strictly (no pun intended). But in a sense they're both making the same distinction.
evaluates expressions, the latter executes I/O actions. When the program is
started, the execution machine wants to execute the actions from the "main to
do list".
Thursday, December 22, 2005
Expressions and statements
This post explaining the I/O monad to a newbie on the Haskell mailing list motivates it in terms of expressions and statements:
Subscribe to:
Post Comments (Atom)
1 comment:
yespornplease
yespornplease
yespornplease
yespornplease
Post a Comment