[racket] confusing error with keywords

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Nov 17 16:15:06 EST 2010

Isn't the true problem that we pretend uniformity of syntax and values? In this case, we specifically pretend that functions and syntaxes may consume the same kind of keyword-labeled arguments. Except that when you make a small mistake, the brittleness of this arrangement shows up and you get WEIRD ERROR MESSAGES. 

When systems work, nobody cares how they work. It's errors that make people notice, and errors happen all the time. 

On Nov 17, 2010, at 3:55 PM, Jon Rafkind wrote:

> I found this error message confusing. The problem is I forgot to require
> racket/contract.
> #lang racket/base
> (define-struct/contract foo ([a any/c]) #:transparent)
> application: missing argument expression after keyword at: #:transparent
> in: (#%app define-struct/contract foo ((a any/c)) #:transparent)
> I was confused because I thought I had a (require racket/contract)
> somewhere but apparently I didn't. I don't know if anything at all can
> be done about it..
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.