[racket-dev] current-*-port
A few minutes ago, Neil Van Dyke wrote:
>
> 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.
Yes, this is why I suggested only that. There are other parameters
that are very popular in certain kinds of code -- for example,
`current-directory' and `current-namespace' can appear a lot in code
that deals with relative paths and meta-tools resp., but the three
ports are the only thing that tend to be used in many contexts.
> 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.
BTW, don't forget unicode -- with good editor support it's an infinite
source for such games.
> 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.
(Almost exactly why I made this suggestion...)
> Incidentally, starting an identifier with "@" is a little bit
> problematic because of how the reader handles ",@" (unquote-splicing).
It's more problematic because of the at-exp syntax.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!