My two cents

bauss jj_1337 at live.dk
Fri Oct 20 02:36:50 UTC 2017


On Friday, 20 October 2017 at 02:20:31 UTC, Adam D. Ruppe wrote:
> On Friday, 20 October 2017 at 00:26:19 UTC, bauss wrote:
>
> In dom.d, since I use this kind of thing somewhat frequently, I 
> wrote a function called `optionSelector` which returns a 
> wrapper type that is never null on the outside, but propagates 
> null through the members. So you can do
>
> foo.optionSelector("x").whatever.you.want.all.the.way.down
>
> and it handles null automatically.
>


That's pretty interesting.


More information about the Digitalmars-d mailing list