lazy thoughts

Bill Baxter wbaxter at gmail.com
Mon Jan 12 18:17:13 PST 2009


On Tue, Jan 13, 2009 at 10:47 AM, bearophile <bearophileHUGS at lycos.com> wrote:
> Bill Baxter:
>
>> > I believe (without having measured... which means that I am essentially
>> > lying) that we can safely assume the lunch will be free or low cost. The
>> > copying of the underlying range should be cheap except for the shortest
>> > ranges.
>
> Using array(xmap()) in my dlibs calls the opApply of the xmap, this is measurably slower than using map(), so I keep both. I keep both also because it's handy to have both.
>
>
>> Another commonly used func from Python is zip().  Not sure if that one
>> is doable in D because it relies heavily on Python's tuples to work,
>> but in Python it offers a very clean solution to iterating over
>> several lists at once.
>
> Take a look at azip, zip and xzip in my dlibs.
>
>
>> Also I really hope we'll be seeing lazy versions of the associative
>> array properties .keys and .values!
>
> Take a look at xkeys and xvalues of my dlibs.
>
> My interest for this community and for D is decreasing quickly.

It should be the opposite, no?  It's looking like we're finally
getting a way to implement those things you've had in your libs
*efficiently* in D, without having to go through the slow opApply
pathway.  I would think you'd be jumping up and down for joy, not
leaving the community.

--bb



More information about the Digitalmars-d mailing list