any news on const/invariant?
Ary Borenszweig
ary at esperanto.org.ar
Wed Nov 28 15:21:58 PST 2007
Walter Bright escribió:
> 0ffh wrote:
>> Actually, when it comes to array declaration style, I wouldn't care if
>> the
>> old style was dropped in D. The new one works fine (for me), and there
>> are
>> some good arguments for having just OWTDI.
>
> For new code, there isn't much point to using the C style array
> declarations. But when you're translating a big chunk of C code, it's a
> time and bug saver. Converting the array declarations from C style to D
> style is surprisingly error prone and rather tedious. It cannot be
> automated with simple string editors.
But it could be automated with a smarter "editor". In fact, I'm willing
to add an option in Descent to do it if there is interest. The outline
view already show declarations that way, so it's just a matter of
"writing down" the code with a simple visitor.
Of course, it still can't be done with simple string editors, so if you
don't have an IDE keeping the C syntax is still time saver.
More information about the Digitalmars-d
mailing list