Bug in readln interface ?

Steven Schveighoffer schveiguy at yahoo.com
Sun Jun 30 16:10:10 PDT 2013


On Sun, 30 Jun 2013 19:08:35 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> On Sun, 30 Jun 2013 15:12:40 -0400, monarch_dodra  
> <monarchdodra at gmail.com> wrote:
>
>>
>> So my question is: Do we *want* to keep this? Should we deprecate it? I  
>> think we should deprecated it.
>>
>> Thoughts?
>
> Fully agree.  The fact that the condition explicitly disallows enums  
> should clue us in that it was not intended to simply play nice with  
> types, it really wants a mutable buffer.
>
> If you want an immutable result, use the version that gives you the  
> result as a return value.

BTW, this should simply be changed, not deprectated IMO.  It is an  
"accepts invalid" bug.  The function description specifically says it  
reuses the buffer and extends as necessary.  Since it can't possibly  
reuse, that means this is truly a bug.

-Steve


More information about the Digitalmars-d mailing list