[racket] keyword args static checking and optimization

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Aug 6 07:25:00 EDT 2011

Feature request... I'd *really* like to see compile-time checking of 
keyword arguments whenever that is possible.

If compiler knows what procedure will be called, and the procedure uses 
keyword args in the usual way, then I'd like the compiler to report an 
error when the call site, say, uses a keyword arg that the procedure 
doesn't support.  Likewise with required keyword args that are missing.

As a second feature request, would be nice if, when the compiler (or 
JIT) can determine the procedure, if it could optimize the keyword args 
the same as if they were positional args.  I don't know how much the 
compiler/JIT is doing already, but the static error-checking that it 
misses make me suspect the compiler is not optimizing this.

The static checking is a much higher priority than the optimization, in 
my book.

-- 
http://www.neilvandyke.org/


Posted on the users mailing list.