4 ms·
> There are no visual handles to latch onto Haskell uses syntax and context to distinguish identifiers as follows: - variables, lower case initial letter - c
by dons 12y ago
> There are no visual handles to latch onto
Haskell uses syntax and context to distinguish identifiers as follows:
- variables, lower case initial letter
- constructors, upper case initial letter
- type variables, lower case initial letter
- type constructor, upper case initial letter
and similarly for classes and modules. And of course, white space is function application.
So you know if it is a variable or a constructor by looking at the first letter. And you know if it is a value-level variable or a type-level variable (or constructor) by context (types can only appear in certain places, e.g. on the right hand side of `::`).
But, yes, they all look like words. They're not ambiguous though. :)