Proposal for SentinelInputRange

Walter Bright newshound2 at digitalmars.com
Thu Feb 28 02:38:55 PST 2013


On 2/28/2013 12:20 AM, Jacob Carlborg wrote:
> On 2013-02-28 06:13, Walter Bright wrote:
>
>> No. Look at how lexer.c is fed data.
>
> C strings have a sentinel from the beginning, '\0'.
>

Look at how the source file is transformed into a 0 terminated input. Files are 
not C strings.

There are no extra copies and no extra tests.


More information about the Digitalmars-d mailing list