On Mon, 2012-05-07 at 00:42 +0200, Andrej Mitrovic wrote:
> On 5/7/12, H. S. Teoh <hst...@quickfur.ath.cx> wrote:
> > you may be better off adapting D's AA implementation
> > to have an AA that consists of just keys.
> 
> Yeah I do that in my code right now. It's pretty easy, just write an
> some opApply/opBinary functions, add to!string(innerhash.keys) for
> good measure and you're set (heh, set).

Any language with which the programmer has to develop their own set
implementation is sadly lacking.

It is true that set can be implemented using a map, but this should be
seen as implementation detail, not as programmer level tool. It
indicates that set should exist where set does. So for C++ it is in the
standard library, for Python it is a built-in (*).

The conclusion for D is straightforward. Which issue to I go to to vote?


(*) Although set was a second class citizen in Python 2, it is a first
class citizen in Python 3. There are even set comprehensions, just as
there are list comprehensions and dictionary comprehensions.  I just
love the influence of functional programming: be data evolution focused,
not control flow focused.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to