D2 is really that stable as it is claimed to be?

Walter Bright newshound2 at digitalmars.com
Sat Sep 21 17:33:31 PDT 2013


On 9/21/2013 5:11 PM, Sean Kelly wrote:
>> Tracking the column number is certainly doable, but it comes at a cost of
>> memory consumption and some compile speed, since it has to be tracked in
>> every token. I used to do it in the Digital Mars C compiler, but it was of
>> only marginal utility and I dropped it.
>
> Can't you just hold a pointer to the beginning of the line and subtract to
> find the column?  I agree that it's generally of marginal utility though.

Holding the pointer has a cost of memory consumption and compile speed :-) as 
well as having to have the source file buffer stay around throughout the compile 
(to compute column number you need the source in order to account for tabs & 
Unicode).

Of course, we can cheat and use a byte to store the column number, as after all, 
nobody has more than 256 columns.

Then you get a bug report where someone does. So raise it to an unsigned short, 
then, sigh, you get another bug report where someone's entire source file is on 
one line, and on it goes.





More information about the Digitalmars-d mailing list