Alex Knauth wrote on 10/14/2015 05:57 PM:
On Oct 14, 2015, at 5:34 PM, Neil Van Dyke <n...@neilvandyke.org
<mailto:n...@neilvandyke.org>> wrote:
I very much appreciate diligence about backward-compatibility, but
I'm not actually aware of any Racket code that actually uses
colon-symbol for any purpose other than as a keyword. And the ones
that use colon-symbol as makeshift keywords are few and far between,
and only for historical reasons, from before PLT Scheme had keywords.
(Or from some obscure super-portable R5RS Scheme SRFI, again because
R5RS Scheme didn't have keywords, and they were just improvising
keywords by using symbols in the conventional way, i.e., `:keyword`.)
Have you seen syntax-parse?
Yes, `syntax-parse` is probably my favorite modern addition to Racket,
ever. Why are colon-keywords a problem?
Jens Axel already mentioned (require (prefix-in:parser-tools/lex-sre)
on the dev list.
There's also :print-type expr, :type, :query-type/args, and
:query-type/result from typed racket.
Those are two unfortunate things, and potentially showstoppers. I think
the convention of colon-keywords in Lisps, even in Scheme dialects,
predates both of those. But possession is nine-tenths of the law, so I
agree that these would have to be looked at and addressed.
And also, searching : in the package docs gives me this:
http://pkg-build.racket-lang.org/doc/search/index.html?q=%3A
<http://pkg-build.racket-lang.org/doc/search/index.html?q=:>
Except for some cryptic-looking non-idiomatic identifiers in
`math/array`, I don't see a problem in that search. (Even the liberties
of `math/array` could even be accommodated, if keywords are made
something like `^:[a-zA-Z].*$`. And the `srfi/42` ones are the main
example I had in mind when I said before, about SRFIs and improvised
keywords.)
It's not worth changing the default for all of racket just to avoid
putting #lang colon-kw racket at the top of a program.
I currently have the opposite opinion on that point.
Partly because, before I would use `#lang colon-kw racket/base` at the
top of each of my modules, I would use `#lang paddle/base`. Then the
effective forking of the language is perhaps more apparent, even though
the actual texts below the respective differing `#lang` lines would be
identical in both cases. Because I really-really don't want to
effectively fork the Racket dialect in which people write snippets on
email lists and such, that's why I'm investing in the energy-intensive
town hall dialogue that's usually involved in making any programming
language change when it's not simply done by fiat and announced as a
done deal. :)
Neil V.
--
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.