[racket] eginner's question on elementary textual replacement...

From: Thomas Chust (chust at web.de)
Date: Fri Mar 9 07:47:30 EST 2012

On Fri, 2012-03-09 at 06:06 -0500, Neil Van Dyke wrote:
> [...]
> I meant that all-caps was appropriate for CPP macros because of the 
> grievous syntactic breakage, such as unbalancing grouping token pairs, 
> and worse.
> [...]

Hello,

yes, that's certainly less of an issue in a world of hygienic macros,
like Scheme, or in a world without macros at all, like Java.

> [...]
> Although "final"-hinted compiler optimizations can be dangerous for 
> people who use "final" yet neither version their libraries nor compile 
> their code when appropriate, I wasn't aware of an all-caps naming 
> convention for "final".
> 
> If I understand correctly, you're saying that it's a happy accident that 
> Java originally bastardized a convention from C, since *some* things 
> that are all-caps for the wrong reason are coincidentally dangerous 
> because of "final", although not all dangerous "final" things are in 
> all-caps, so the happy accident only gets us so far? :)
> [...]

That's kind of what I meant, yes :-) In particular giving the host of
public static final int interface members all-caps identifiers is not
such a bad idea.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.