[Haskell-cafe] Unicode Haskell source -- Yippie!

Rustom Mody rustompmody at gmail.com
Wed Apr 30 10:24:08 UTC 2014


On Wed, Apr 30, 2014 at 2:33 PM, Daniel Fischer <
daniel.is.fischer at googlemail.com> wrote:

> > x & 0xF == 0xF
> > has only 1 meaningful interpretation; C chooses the other!
> > The error comes (probably) from treating & as close to the logical
> > operators like && whereas in fact it is more kin to arithmetic operators
> > like +.
>
> That comes from `&` and `|` being logical operators in B. Quoth Dennis
> Ritchie
> (http://cm.bell-labs.com/who/dmr/chist.html in the section "Neonatal C"):
>
> > to make the conversion less painful, we decided to keep the precedence of
> > the & operator the same relative to ==, and merely split the precedence
> of
> > && slightly from &. Today, it seems that it would have been preferable to
> > move the relative precedences of & and ==, and thereby simplify a common
> C
> > idiom
>

Nice! I learn a bit of history.
Hope we learn from it!

viz. Some things which are easy in a state of transition become painful in
a (more) steady state.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140430/8735530b/attachment.html>


More information about the Haskell-Cafe mailing list