[racket-dev] [plt] Push #27090: master branch updated

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Jul 6 09:53:03 EDT 2013

On Fri, Jul 5, 2013 at 6:50 PM,  <eli at racket-lang.org> wrote:
>
>
> f90fe4c Eli Barzilay <eli at racket-lang.org> 2013-07-05 18:08
> :
> | Get rid of the `#:function' keyword.
> |
> | These problems are always dealt with via an internal function instead of
> | making the name argument part of the visible API.
> :
>   M pkgs/racket-pkgs/racket-doc/json/json.scrbl | 10 ++------
>   M racket/lib/collects/json/main.rkt           | 33 +++++++++++++++-----------

I think we should keep the name argument part of the API.  Imagine
that I had a another function that used `read-json` or `write-json`
internally, and I wanted the same good error messages that
`jsexpr->bytes` has. Then I'd have to either perform string
replacement on the exception, or create do something else equally
ugly.

In general, this is why we have things like `class/derived` -- so that
wrappers can have good error messages with their names.

Sam

Posted on the dev mailing list.