Version française
Home     About     Download     Resources     Contact us    
Browse thread
New Year's resolution suggestions...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: qrczak@k...
Subject: Re: New Year's resolution suggestions...
Wed, 3 Jan 2001 08:27:02 -0800 (PST), Brian Rogoff <bpr@best.com> pisze:

> I wonder if the same holds for the average working Haskell or
> Clean program which makes heavy use of infixes. What do the Haskell
> programmers on the list think? Does the Haskell approach buy much
> more in practice?

I don't use custom infix operators much in Haskell. Parsing combinators
seem to be their most important use.

More common is forming of infix operators from identifiers, e.g.
    uri `relativeTo` baseUri
    attr0 `setBold` True `setReverse` True
    text1 `isPrefixOf` text2
    ptr `indexPtr` 1
    x `elem` list
which are also used for what OCaml uses alphanumeric operators:
    `div`, `mod`, `shift`

Their precedence can be changed too, but often it is left as default:
between function application and operator application, left associative.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK