Andrei Alexandrescu napisał:
> On 1/21/11 7:35 PM, Tomek Sowiński wrote:
> > Andrei Alexandrescu napisał:
> >
> >>> Like I said, anything that doesn't bother to expose range-interfaced
> >>> iterators and is not performance critical is
> >>
On 1/21/11 7:35 PM, Tomek Sowiński wrote:
Andrei Alexandrescu napisał:
Like I said, anything that doesn't bother to expose range-interfaced iterators
and is not performance critical is
considered a target for ad hoc ranges. Working with non-D libraries, or
libraries ported to
Andrei Alexandrescu napisał:
> > Like I said, anything that doesn't bother to expose range-interfaced
> > iterators and is not performance critical is
> > considered a target for ad hoc ranges. Working with non-D libraries, or
> > libraries ported to D but preservi
by design lazy
parameters (unlike vanilla delegates) don't work like closures. Still,
even with the overhead and limitations the idiom is remarkably useful,
especially in face of range-unfriendly libraries from outside D realm.
Enjoy.
What types of stuff do you need ad-hoc ranges for? What&
zy
> > parameters (unlike vanilla delegates) don't work like closures. Still,
> > even with the overhead and limitations the idiom is remarkably useful,
> > especially in face of range-unfriendly libraries from outside D realm.
> >
> > Enjoy.
>
> What types
don't work like closures. Still,
> even with the overhead and limitations the idiom is remarkably useful,
> especially in face of range-unfriendly libraries from outside D realm.
>
> Enjoy.
What types of stuff do you need ad-hoc ranges for? What's the use case? I've
never actuall
On Thursday, January 20, 2011 16:19:54 bearophile wrote:
> Tomek Sowiñski:
> > auto range(T, Whatever)(lazy bool _empty, lazy Whatever _popFront, lazy T
> > _front) {
>
> I am not sure, but I think Andrei has deprecated the "lazy" attribute.
In general or on a specific function? I'm pretty sure t
bearophile napisał:
> I am not sure, but I think Andrei has deprecated the "lazy" attribute.
Yes, but AFAIR in favor of implicit conversions of expressions to parameterless
delegates, which strengthens my little idiom.
--
Tomek
Tomek Sowiñski:
> auto range(T, Whatever)(lazy bool _empty, lazy Whatever _popFront, lazy T
> _front) {
I am not sure, but I think Andrei has deprecated the "lazy" attribute.
Bye,
bearophile
Doing my own deeds, I often found myself in need of writing up a range just to
e.g. feed it into an algorithm. Problem is, defining even the simplest range --
one-pass forward -- is verbose enough to render this (correct) approach
unprofitable.
This is how I went about the problem:
auto range(
10 matches
Mail list logo