[Haskell-cafe] Re: Difference between div and /

Maciej Piechotka uzytkownik2 at gmail.com
Thu Jun 3 06:50:46 EDT 2010


On Thu, 2010-06-03 at 12:44 +1200, Richard O'Keefe wrote:
> On Jun 3, 2010, at 1:13 AM, Maciej Piechotka wrote:
> 
> > On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote:
> >> For what applications is it "useful" to use the same symbol
> >> for operations obeying (or in the case of floating point
> >> operations, *approximating* operations obeying) distinct laws?
> >>
> >>
> >
> > If the given operations do share something in common. For example * is
> > usually commutative. However you do use it with quaternions (Hamilton
> > product). You even write ij = k despite the fact that ji = -k.
> 
> I think you just made my point:  Commutativity is NOT one of the  
> standard
> properties that * is EXPECTED to possess. 

I don't think that many people expect * to be not commutative (I'm not
speaking about people who deal with Mathematics - I mean 'average
person' and 'average programmer'). 


> If you look at the Int and Double instance of Random in
> the Random.hs that comes with Hugs, you'll see they use
> different code.  It's not because of any problem with /
> per se but because they need genuinely different algorithms.
> 
> 

Point taken.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100603/b17fc8a5/attachment.bin


More information about the Haskell-Cafe mailing list