Empty VS null array?

Kagamin spam at here.lot
Sat Oct 19 05:04:41 PDT 2013


On Friday, 18 October 2013 at 17:59:17 UTC, Max Samukha wrote:
> On Friday, 18 October 2013 at 16:55:19 UTC, Andrei Alexandrescu 
> wrote:
>>
>> Fair point. I just gave one possible alternative out of many. 
>> Thing is, relying on client code to distinguish subtleties 
>> between empty and null strings is fraught with dangers.
>>
>> Andrei
>
> I agree. Thinking about your variant of readln - it's ok to use 
> [] as the value indicating EOF, since it is not included in the 
> value set of type "line" as you define it.

No, if the last line is empty, it has no new line character(s) at 
the end, and is as empty, as it can get.


More information about the Digitalmars-d mailing list