[erlang-questions] Funs!

ok ok@REDACTED
Mon Jul 30 01:40:21 CEST 2007


Concerning the use of capitalisation in functional programming,
note that Standard ML and Haskell both insist on specific use of
capitals.
    "There are six kinds of names in Kaskell:  those for _variables_
     and _constructors_ denote values; those for _type variables_,
     _type constructors_, and _type classes_ refer to entities
     related to the type system; and _module names_ refer to modules.
     There are three constraints on naming:
==> 1. Names for variables and type variables are identifiers
        beginning with lower case letters or underscores; the other
        four kinds of names are identifiers beginning with upper case
        letters.
     2. Constructor operators are operators beginning with ":";
        variable operators are operators not beginning with ":".
     3. An identifier must not be used as the name of a type constructor
        and a class in the same scope."

Basically, things that can appear in the same syntactic position
are distinguished by their first character.  Note that this is
DESPITE Haskell and SML having "rich" syntax (compared with Erlang)
and strong static type systems.





More information about the erlang-questions mailing list