Does D have too many features?

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Apr 29 19:25:44 PDT 2012


On Sun, Apr 29, 2012 at 10:21:19PM +0200, Alex Rønne Petersen wrote:
> On 29-04-2012 00:49, H. S. Teoh wrote:
> >On Sun, Apr 29, 2012 at 12:39:03AM +0200, Timon Gehr wrote:
[...]
> >>- 'in' operator returning a pointer to the element.
> >
> >Yeah that one elicited a WAT from me when I first started using it.
> >Surprisingly enough, it sounded OK when I read it in TDPL, but when I
> >started using it I realized just how b0rken it is.
[...]
> 
> How so? It's seemed entirely reasonable to me.
[...]

I was expecting it to return bool.

It also precludes bool-valued AA's from being implemented using bit
arrays, since you can't return a pointer to a bit.


T

-- 
In order to understand recursion you must first understand recursion.


More information about the Digitalmars-d mailing list