Checking function parameters in Phobos

Jacob Carlborg doob at me.com
Wed Nov 20 23:36:37 PST 2013


On 2013-11-20 19:53, Meta wrote:

> Yes. It is very important not to allow direct access to the underlying
> value. This is important for ensuring that it is not put in an invalid
> state. This is a mistake that was made with std.typecons.Nullable,
> making it useless for anything other than giving a non-nullable type a
> null state (which, in fairness, is probably all that it was originally
> intended for).

In that case all string functionality needs to be provided inside the 
Validated struct. In addition to that we loose the beauty of UFCS, at 
least for functions expecting plain "string".

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list