[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Microlight (was Re: paving cowpaths with libraries)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 20 Feb 2012 13:32:11 +0200
On Mon, Feb 20, 2012 at 1:16 PM, Ross Bencina
<rossb-lists@audiomulch.com> wrote:
> I would find it kind of weird if sorted() just returned a copy of self, if
> that's the desire, I'd say it's better to have sort() return itself.
> sorted() should make a sorted copy.
Makes sense to me. Having conventions like that prevents confusion.
mlx.List is going into ml; this brings us up to 648 lines. When does a
module stop being micro ? ;)
(That's 17Kb source or bytecode)
If l is a List, then List(l) should be a copy constructor. So we get
a simple definition List(self:sort()) for sorted().
The Set class is about 20 lines; does it go in too? Currently s1+s2
means union, and s1*s2 means intersection; we still have a few
operators left to overload! Unfortunately, we don't have += etc
available as overloads.
steve d.