On Thu, Oct 15, 2015 at 3:37 PM, Anthony Carrico <acarr...@memebeam.org> wrote:
> I didn't really want to get dragged into this, but keep in mind that:
>
> (symbol? #'test) ; -> #f
>
> IIRC the common lisp keywords you admire are symbols. I think that the
> proposed syntax confuses symbols and keywords, which are distinct
> types.

Yes, CL keywords are symbols, but there's no confusion since they are
very different from regular symbols.

To complete the details for whoever might be interested, in CL symbols
can be written as `foo:bar` for the (externally visible) "bar" symbol
from the "foo" package.  Symbols with no colon are implicitly in the
current package.  This is why `:foo` makes sense for keywords: it's the
"foo" symbol from the special keyword package -- special since it has no
name, and since all of its symbols are visible outside.  Now, consider
the fact that CL equates "identifiers" with "symbols", and uses packages
as a half-assed[*] attempt to get some sanity with my code not stepping
over your code -- and that should explain why `:foo` and `foo` are both
"the same type" but are very different in nature -- to the point that
your argument of a distinct type doesn't hold well in CL (and in Racket
too, since Neil's suggestion would make `:foo` not be a symbol).

Notes:

1. I use [*] in a technical way -- I once tried to explain hygiene to
   CLers by saying that it's as if each scope has its own (anonymous)
   package.

2. Also, talking about what counts as a symbol in CL is not too
   productive.  CL can surprise you with gems like: (symbol? (cdr '(1)))
   returning true.

3. I didn't see it mentioned so: the original motivation for `#:foo` was
   an attempt to avoid the argument of `:foo` vs `foo:` vs "either one"
   vs whatever.

-- 
                    ((x=>x(x))(x=>x(x)))                   Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to