[racket-dev] current-*-port
Marijn wrote at 05/07/2012 10:54 AM:
> How about prefixing a tilda (~) instead of "current-"? It looks like a
> current ;P and also like a snake (parameters could be thought to
> ``snake'' through the code). Alternatively the at-sign (@) to
> represent currentness. To make them stand out more (if that is
> desirable) the same symbol could be postfixed as well. In conclusion,
> some options are:
>
> ~error-port
> @error-port
> ~error-port~
> @error-port@
>
I don't mind having "stdout", "stderr", and "stdin" as aliases for their
current names.
As a naming convention for all parameters, however, I wouldn't mind
keeping the existing one ("current-" prefix), although it is a little
cumbersome. And even though it's a little cumbersome, a little
cumbersome is good, considering that I think parameters are for special
occasions only.
I was thinking before about alphabetic naming convention, rather than
using symbol characters. For one reason, I'd like to save the few
remaining ASCII symbol characters for other linguistic purposes,
especially considering that Racket is also a language experimenter's
platform, and we should leave some characters for future expansion. For
another reason, I think that alphabetic names can be less
cryptic-looking (and easier to pronounce) than symbol characters, so I
try to use symbol characters with hesitation only.
I'm not in love with any of the alternative alphabetic naming
conventions I've thought of: "cur-" prefix, "-param" suffix, "-parm"
suffix, "-parameter" suffix. (And, if "-parm" suffix, I'd end up using
"chicken-parm" as an example in language tutorials, making them
gratuitously obtuse.)
Thinking about this has me coming back around to thinking that
"current-" is not so bad, after all. The main drawback is that one's
demos look verbose, when one wants to win over the half-dozen people
using Arc.
Incidentally, starting an identifier with "@" is a little bit
problematic because of how the reader handles ",@" (unquote-splicing).
Neil V.
--
http://www.neilvandyke.org/