Minor containers API changes

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Nov 30 00:51:20 CET 2011


On 30 November 2011 08:28, Joachim Breitner <mail at joachim-breitner.de> wrote:
> Hi,
>
> Am Dienstag, den 29.11.2011, 14:20 +1100 schrieb Ivan Lazar Miljenovic:
>> There's still the tension of whether to
>> put particular functions as class methods or not though (e.g. just
>> look at these proposals about whether to include certain functions).
>
> I’d expect that in a lot of uses, the type is known at compile time. In
> that case, the general of a function that is not part of the class can
> be replaced by an optimized function using RULES, can’t it?

I've seen that be used before but to me it seems rather hacky (and
rather GHC-specific).

> But this is not perfect, because non-inlined code that is itself still
> polymorphic would not benefit from that.

Right, so any form of other derived generic code would also not be optimised.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Libraries mailing list