Reality drives me to write less clean code, sorry for mistakenly posting in D.announce
Ary Manzana
ary at esperanto.org.ar
Fri Oct 12 03:22:58 PDT 2007
Mike Parker escribió:
> davidl wrote:
>>
>> First practice:
>>
>> char[] text;
>> char* p;
>> char* end;
>>
>
> Pointer arithmetic in D is a no-no
Problem is, the code davidl is trying to do is a port of DMD's front-end
from C++ to D. It's a little counterintuitive: "Don't use pointer
arithmetic in D, but it helped me a little to make DMD's front-end more
readable and efficient." :-P
This is just a guess, but I think davidl is looking for a way to iterate
over the chars of an array, like in a lexer, as efficient and as nice
(beauty of code) as possible.
More information about the Digitalmars-d
mailing list