[nem-en] list not enumerable

Kamil Skalski kamil.skalski at gmail.com
Tue Jan 9 21:25:32 CET 2007


Yes. S.C.G.ICollection is designed for mutable collections with random
index access - acutally all methods / properties it defines are either
not supported by immutable lists (Remove, Insert, Add : 'a -> void) or
are preformance expansive and discouraged (Count, Item[])

We would need to throw exceptions inside those methods and give slow
implementation for methods people are quite used to (Count, indexer),
so I guess it is better to just disallow this at all.

2007/1/9, Pieter Breed <pieter at pb.co.za>:
> Hi,
>
> I have a few methods which take parameters of type ICollection but I cannot
> pass the std nemerle list to those functions. Is there an obvious reason why
> list does not inherit from ICollection?
>
> Regards,
>  Pieter
>
> --
> "pain is only temporary, but quitting lasts forever"
>
> +27 82 567 6207
> http://pieterbreed.blogspot.com/
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list