Re: Case sensitive languages
From: Tomasz Zielonka (tomasz.zielonka_at_gmail.com)
Date: 02/17/05
- Next message: Dave: "Re: Help with .reg programming"
- Previous message: TARUN SINHA: "Algorithm"
- In reply to: Mike: "Case sensitive languages"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Feb 2005 08:59:08 GMT
Mike wrote:
> Are there any benefits inherent in a programming language
> being case sensitive?
There are some programming languages that even distinguish between
different classes of lexical symbols looking at their case. Two examples
are Haskell and OCaml.
In Haskell, variables and type variables are always written starting
with lowercase, and type constructurs, data constructors, module names
and type-class names are written starting with uppercase. I know some
people won't like the idea, but for a Haskell programmer it works.
It allows to easily make nice syntax colouring. This in turn helps to
avoid certain kinds of errors which are easier to make eg. in SML, a
language similar to OCaml. In SML variables and "data constructors" can
be both started with lower- and uppercase, so it's easy to confuse them
in pattern matching - this can result in a mysterious bug.
Best regards
Tomasz
-- Szukamy programisty C++ i Haskell'a: http://tinyurl.com/5mw4e
- Next message: Dave: "Re: Help with .reg programming"
- Previous message: TARUN SINHA: "Algorithm"
- In reply to: Mike: "Case sensitive languages"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|