4 ms·
I think the problem was that `foo:` is a legal symbol. That is, there were a potential backwards compatibility problem. That said, I wish we adopted the `foo:`
by soegaard 2y ago
I think the problem was that `foo:` is a legal symbol.
That is, there were a potential backwards compatibility problem.
That said, I wish we adopted the `foo:` style back then.
Btw - since `foo:` is a legal identifier and references to unbound
identifiers are rewritten to `(#%top . id)` one can write a custom
`#%top` to any `id:` into `#:id` without making a new language.
This technique is used in `scribble/html/main` for turning
identifiers that end with colon into self-quoting symbols.
- neilv 2y agoI like both `:foo` and `foo:`, and could've gone with either one. IIRC, Joe Marshall pointed out at the time that `:foo` means the colons line up nicely when you have a long form of keyword arguments, each one starting its own line. And one of those lines might have multiple lines dangling off it, but the lined-up colons and indentation help make the structure clear visually. Typed Racket later made use of colons on the ends of identifiers, like in `let:` and `lambda:`, to mean like the Scheme form, but with expressed types. (I might've tried to use square brackets for sprinkling optional type annotations. Such that a trivial syntax transform could go from typed to untyped, simply by removing square bracket forms, or by substituting a square bracket form with its first element.) Having Scheme code easy to type, and easy on the eyes, are two of the things that are important to me, though not the most important. I wondered whether the `#:` was insisted upon because someone didn't see code the same way I do, and thought that the people who objected were only bikeshedding about minor details. But it's a minor detail that was shredding the eyeballs of some of us throughout each day. :)