[clean-list] why is the notation for list and array indexing
different?
Pieter Koopman
pieter at cs.ru.nl
Mon Aug 25 09:11:09 MEST 2008
Hi Terrence,
terrence.x.brannon at jpmchase.com wrote:
>
> What motivated distinct notation for list indexing (MyList !! i)
> versus array indexing (MArray.[2] )?
An Array is an instance of a 2 parameter class (class Array .a e where
..) while lists are a plain polymorphic data type. I think we cannot
convince the type checker that it is a good idea to use the same
operator in both situation.
Best,
Pieter Koopman
> You would think that it would simply be overloaded.
>
> --
> Terrence Brannon - SID W049945
> 1111 Polaris Pkwy, OH1-1141, Columbus, OH 43240
> 818-359-0893 (cell)
> 614-213-3426 (fax)
More information about the clean-list
mailing list