returning different types via function

bearophile bearophileHUGS at lycos.com
Tue Nov 19 13:24:25 PST 2013


Dicebot:

> I don't want to argue this in details right now but I think 
> that simply banning null references as valid arrays in program 
> as a whole via contracts is better approach than adding extra 
> level of indirection via Nullable ;)

Nullable is a struct, it doesn't introduce a new leavel of 
indirection (sometimes it doesn't even add new data). And in the 
specific situation what's better could only be judged by the OP, 
because he/she has not shown the code.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list