Coming late to this.

On Wed, 14 Oct 2015 11:50:41 -0400, Neil Van Dyke
<n...@neilvandyke.org> wrote:

>We are conducting a highly scientific poll.
>
>The question we want to answer is whether people would like for the 
>Racket standard languages to have symbols that begin with the colon 
>character (except for the symbol `:`) to read the same has keywords that 
>begin with pound-colon.

I actually prefer the #: syntax, but what I would like is support for
"existence" keywords - i.e. keywords with no argument - where the only
thing you care about is whether or not the keyword was provided.

Obviously, this can be done using a "rest" argument and symbols, but
the #: syntax draws attention that other symbols do not because
DrRacket, at least by default, colors keywords differently from other
symbols.

Although the keyword syntax coloring still works with a tick before a
symbol that looks like a keyword, having to remember the tick is a
PITA when you are thinking of the symbol as a keyword.  If you forget
it, you get a  nasty
    "application: missing argument expression after keyword"
error.


How much trouble would it cause to allow naked keywords and provide a
predicate based on their name?  E.g.,

(define ( test blah #:opt #:req req )
   :
  (when #:opt?  ... )
   :
  )

(test #:req 3)
(test #:req 42 #:opt)

Or even something like  (define ( test blah #:opt [] #:req req ) which
makes it more obvious that the keyword is only there to be tested?

George

-- 
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