Identifer name style (Was: [Haskell-cafe] let and fixed point operator)

Henning Thielemann lemming at henning-thielemann.de
Mon Sep 3 08:34:14 EDT 2007


On Fri, 31 Aug 2007, Brandon S. Allbery KF8NH wrote:

> On Aug 31, 2007, at 16:01 , Sterling Clover wrote:
>
> > In particular for a function -- n, m, etc or x, y, etc? What about
> > for f' defined in a let block of f? If I use x y at the top level I
> > need to use another set below -- is that where x' y' are more
> > appropriate, or x1, y1?
>
> Usual style is x',y'.

This seems to be a matter of taste. x1, y1 are certainly ok, too.

> For longer names, camelCase is the usual convention but some
> libraries which basically import everything from C via the FFI use
> C_style_names.  Imported constants/macros which are uppercase with _
> tend to be mapped to tHIS_KIND_OF_NAME (see for example the Win32
> package).

Is this considered an accident or a feature? I'd prefer to convert these
identifiers to thisKindOfName.


There is also a collection of articles about style:
  http://www.haskell.org/haskellwiki/Category:Style


More information about the Haskell-Cafe mailing list