[Haskell-cafe] Language simplicity

Andrew Coppin andrewcoppin at btinternet.com
Tue Jan 12 17:32:24 EST 2010


Daniel Fischer wrote:
> Am Dienstag 12 Januar 2010 23:12:20 schrieb Niklas Broberg:
>   
>>> Haskell '98 apparently features 25 reserved words. (Not counting
>>> "forall" and "mdo" and so on, which AFAIK are not in Haskell '98.)
>>>       
>> 21 actually. case, class, data, default, deriving, do, else, if,
>> import, in, infix, infixl, infixr, instance, let, module, newtype, of,
>> then, type, where. There's also three special words that can still be
>> used as identifiers, so aren't reserved: as, qualified, hiding.
>>     
>
> Okay, 'as' is easy. But can you find a situation where 'qualified' or 
> 'hiding' would be natural choices for an identifier? I'd love to see those 
> in some code :)
>   

I quite often try to use "in-file" and "out-file" abbreviated to "if" 
and "of" - which obviously fails miserably. And "as" is pretty simple, 
as you point out.

It's weird that us Haskell people complain about there being only 26 
letters in the alphabet when all other known programming languages 
emphasize the use of long, descriptive names like "log_file" instead of 
"lf"...



More information about the Haskell-Cafe mailing list