defining "in" What is the proper way in D2?

Simen Kjaeraas simen.kjaras at gmail.com
Mon Sep 12 07:10:35 PDT 2011


On Mon, 12 Sep 2011 00:11:11 +0200, Timon Gehr <timon.gehr at gmx.ch> wrote:

> I think the fact that "in" for AAs returns a pointer is a mistake and  
> ugly in the first place and any generic code that relies on any  
> container to return a raw internal pointer is flawed by itself imho.

If D had a Nullable struct, that would likely be a much better return
type for 'in'. The thing is, we do have a nullable!T type: T*.

This is simply a case of having a wrench and needing a hammer.

-- 
   Simen


More information about the Digitalmars-d-learn mailing list