List of Phobos functions that allocate memory?

Dicebot public at dicebot.lv
Fri Feb 7 03:06:46 PST 2014


On Friday, 7 February 2014 at 05:25:26 UTC, Brad Anderson wrote:
> Thinking about this more it'd probably be a good idea to use the
> type system to segregate non-validated user input from the rest
> of your program. UnvalidatedString or something.
> UnvalidatedString.validate() returns a string you can then use 
> in
> the regular fashion. That way unvalidated data can't weasel its
> way into the trusted portion of your program without getting
> checked first. Anyway, that's just an idea (and getting further
> and further off topic).

Yes, I even had some simple proof-of-concept drafts of such 
approach for vibe.d but have never finished it. User input is not 
a problem if Phobos will provide more strongly typed @nothrow 
tools.


More information about the Digitalmars-d mailing list