-We can further divide these languages based on whether they use *lazy* or
-*strict/eager* evaluation. We'll discuss the difference between these during
+We can further divide these languages based on whether they use lazy or
+strict/eager evaluation. We'll discuss the difference between these during
instance, languages of the ML family are all statically-typed functional
languages with strict/eager evaluation. These include [[!wikipedia SML]] and
[[!wikipedia Caml]] and [[!wikipedia Nemerle]]. Other statically-typed
instance, languages of the ML family are all statically-typed functional
languages with strict/eager evaluation. These include [[!wikipedia SML]] and
[[!wikipedia Caml]] and [[!wikipedia Nemerle]]. Other statically-typed
[[!wikipedia Coq]]. Like Scheme, many of these languages permit *imperatival*
as well as functional coding; but they are regarded as functional programming
languages because they are so hospitable to functional programming, and give it
a central place in their design.
A few languages such as [[!wikipedia Miranda]] and [[!wikipedia Haskell]] are
[[!wikipedia Coq]]. Like Scheme, many of these languages permit *imperatival*
as well as functional coding; but they are regarded as functional programming
languages because they are so hospitable to functional programming, and give it
a central place in their design.
A few languages such as [[!wikipedia Miranda]] and [[!wikipedia Haskell]] are
it'd be more strictly accurate to say Haskell is lazy *by default*. You can
also make Haskell evaluate some expressions strictly/eagerly; you just have to
it'd be more strictly accurate to say Haskell is lazy *by default*. You can
also make Haskell evaluate some expressions strictly/eagerly; you just have to
are the reverse: they're strict/eager by default, but you can get lazy
evaluation where it's needed, you just have to ask for it explicitly.
Unlike OCaml, Haskell is much more extreme about being non-imperatival. Though
it's possible to write imperative code in Haskell, too; one just has to
are the reverse: they're strict/eager by default, but you can get lazy
evaluation where it's needed, you just have to ask for it explicitly.
Unlike OCaml, Haskell is much more extreme about being non-imperatival. Though
it's possible to write imperative code in Haskell, too; one just has to
monads can be used to create purely functional representations of imperatival
algorithms. (You can do the same in languages like Scheme and OCaml, too.
What's different is that in Haskell monads are the *only* way to deal with
monads can be used to create purely functional representations of imperatival
algorithms. (You can do the same in languages like Scheme and OCaml, too.
What's different is that in Haskell monads are the *only* way to deal with
We'll talk much more about monads, lazy vs strict evaluation, and functional vs
imperatival code as we proceed.
We'll talk much more about monads, lazy vs strict evaluation, and functional vs
imperatival code as we proceed.