Deprecate C style declerations?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Dec 21 10:42:15 PST 2006
"Thomas Kuehne" <thomas-dloop at kuehne.cn> wrote in message
news:slrneokpko.mj5.thomas-dloop at birke.kuehne.cn...
> How about "pragma(line, ...);" ?
Much nicer looking, but unfortunately, there's a problem with it. Pragmas
are not considered until after the lexical pass, and that's what the #line
directive affects. Basically the lexer would have to know about pragmas and
be able to syntax and semantic them partially, breaking the separation
between the passes. The current syntax has the advantage of meaning
absolutely nothing after the lexical pass completes.
Furthermore, pragmas can only legally appear where declarations would.
#line can appear anywhere, even in the middle of a line.
But I agree that it's a waste of # :)
More information about the Digitalmars-d
mailing list