Foreach and string to string assignment (maybe a bug..)

bearophile bearophileHUGS at
Thu Oct 14 10:49:13 PDT 2010

Steven Schveighoffer:

> This is a common problem in defining an opApply loop which streams data --  
> do you make things safe or efficient?  The only reasonable solution IMO is  
> to make them efficient, because safety can be had by duping the data.

The only reasonable solution is to make it safe, and then allow the unsafe and more efficient behaviour only on explicit request. This follows D philosophy and in practice it's the only design that allows you to write programs that actually work, instead of being just a nest for bugs.


More information about the Digitalmars-d-learn mailing list