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

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Oct 14 10:55:38 PDT 2010


So do I file this as a bug? The current behavior is way too subtle
imo, at least the compiler could issue a warning if this behavior is
intended.

On 10/14/10, bearophile <bearophileHUGS at lycos.com> wrote:
> 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.
>
> Bye,
> bearophile
>


More information about the Digitalmars-d-learn mailing list