[erlang-questions] Intel Quad CPUs
ok
ok@REDACTED
Mon Sep 10 03:14:05 CEST 2007
On 8 Sep 2007, at 2:12 am, Tony Finch wrote:
> I'd suggest using initial caps for type names, and omit the () except
> when the type parameter is non-trivial. (That is somewhat like the
> Haskell type syntax.)
It would be more accurate to describe it as "as unlike the Haskell
syntax as possible". Haskell uses the same conventions for type
(constructors/variables) as for data (constructors/variables), so to
be close to Haskell syntax, you have to use the same spelling for
type constructors as you do for constants, namely, LOWER case. Also,
in Haskell, every type constructor is a function, so to be close to
Haskell syntax, you would have to use function notation for all
Erlang type constructors. And behold, that's exactly what Erlang
does! The *existing* type syntax is precisely what you get when you
apply the *principles* behind Haskell type syntax to a language with
Erlang's lexical conventions.
More information about the erlang-questions
mailing list