Re: Ultra-short names taylanbayirli@xxxxxx 16 Aug 2015 16:45 UTC
John Cowan <firstname.lastname@example.org> writes:
> What do you think about using `!` instead of `set!` and `$` instead of
> `ref`? They are very short, preserve the !-convention, fit in nicely
> with Gauche's `~`, and aren't much used in existing Schemes. I ran them
> through my 47 Schemes, and found only these:
> Schemik excludes `$` from symbols, but doesn't seem to use it otherwise.
> Llava uses `!` as a synonym for `not`.
> Elk binds `!` to the value of the last expression evaluated at the REPL.
> Inlab has a procedure `!` which invokes an editor on the last expression
> typed at the REPL and evaluates it.
> Owl Lisp uses `!` for the factorial function.
I'd like to keep with ~ for compatibility with existing practice in
I'm not sure about using merely ! for an imperative command. This is
mostly out of gut feeling (so feel free to outweigh my opinion with
numbers) but it just feels wrong. (~ foo bar baz) can be thought of as
a "place expression" which either yields the value at that place or lets
it be set, in any case becoming part of a larger expression or command
and thus making its role obvious, whereas (! foo bar baz) will be a
command standing on its own line, yet there is no outstanding *verb*
telling you what the command does. A bit too strange for me. Maybe I
mentally associate punctuation with (pure) expressions...
More objectively, I don't like it that it can indeed be interpreted as
"not", "factorial", and possibly more. This is perhaps a common problem
with single-punctuation notation: too much semantic overloading.
Unless there's many people who like the idea, I'll let it rest.