poll for properties

Leandro Lucarella llucax at gmail.com
Wed Jul 29 06:35:10 PDT 2009


Michel Fortin, el 29 de julio a las 09:14 me escribiste:
> On 2009-07-28 19:59:30 -0400, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> said:
> 
> >The way Phobos does things is the following:
> >a) You must define .empty which completes in O(1).
> >b) If you can define .length with O(1), define it, otherwise don't.
> >Then Phobos defines walkLength() on a best-effort basis which is guaranteed to 
> >finish in O(n) but may finish faster. It uses .length if defined, or else it 
> >just iterates the range to exhaustion.
> 
> This looks like a good approach. I'm just not too thrilled by the name 
> "walkLength". But perhaps I'm the only one.

You are not, but who cares anymore ;)

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Cuando intenté arrimarle mi brazo
Se puso a hablar de Miller, de Anais Nin y Picasso
Y si osaba intentar robarle un beso
Se ponía a leer de Neruda unos versos
Me hizo mucho mal la cumbiera intelectual



More information about the Digitalmars-d mailing list