equivariant functions
Bill Baxter
wbaxter at gmail.com
Mon Oct 13 22:17:23 PDT 2008
On Tue, Oct 14, 2008 at 1:54 PM, Benji Smith <dlanguage at benjismith.net> wrote:
> Bill Baxter wrote:
>>
>> I've not seen a language where keywords are prefixed, but now that you
>> mention it, it does kinda make sense. You only expect to have a few
>> dozen keywords, but the number of variables used in any given program
>> will be much much greater. So if you're going to push one or the
>> other into a separate namespace, it seems more logical to do it to the
>> keywords, not the identifiers.
>
> The C preprocessor uses # as a prefix for all of its keywords.
Good point. A sub-language grafted on top of another language...
Text markup languages like HTML/XML etc are like that too, now that I
think of it. The keywords aren't prefixed, but they are syntactically
separated. Doxygen/JavaDoc/DDoc are other examples. Those @param
type keywords are all prefixed. LaTeX is like that too.
> My preference in D would have been for compile-time keywords to use that
> same convention, rather than all being prefixed with the word "static".
Interesting thought. # is certainly another one of those syntactic
under-performers. There was a discussion about reclaiming it maybe
over a year ago. I think it involved Andrei, too -- in his first
stint on the NG, before his extended leave.
--bb
More information about the Digitalmars-d
mailing list