Kinds of containers

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 21 12:18:44 PDT 2015


On 10/21/2015 02:24 PM, Robert burner Schadek wrote:
> On Wednesday, 21 October 2015 at 17:23:15 UTC, Andrei Alexandrescu wrote:
>> Even simpler, hasMethod!(Container, "append") -- Andrei
>
> I know this goes against your talk at DConf, but having to write string
> parameters does not feel good. I'm will properly not be the only one who
> will mistype "apend" and wonder why the other template function will be
> chosen. I rather have the compiler scream at me telling me there is no
> symbol hasApend. And hasAppend!Container is less typing than
> hasMethod!(Container, "append").

Yah, but defining isXxx for dozens of Xxx doesn't sit well either. -- Andrei



More information about the Digitalmars-d mailing list