On Mon, Jun 10, 2013 at 3:46 PM, Sam Tobin-Hochstadt <sa...@ccs.neu.edu>wrote:
> On Mon, Jun 10, 2013 at 9:09 AM, Matthias Felleisen > <matth...@ccs.neu.edu> wrote: > > > > On Jun 10, 2013, at 8:51 AM, Laurent wrote: > > > > On Sun, Jun 9, 2013 at 7:54 PM, Matthias Felleisen <matth...@ccs.neu.edu > > > > wrote: > >> > >> (struct-open item item1 weight value volume) > > > > > > I would love to see such an addition to core Racket! > > > > It's on my todo-list. > > I don't understand what's better about `struct-open` than: > > (match-define (item weight value volume) item1) > > which is a far more general form. I don't think we should add a > version of `match-define` specialized for structs unless there's a > particular need for it. > Yeah, you're probably right; There's no real need when you have `match-define'. Though I prefer the order of the arguments in `struct-open', because in general I write the `item1' first and then go back to writing the new bindings. (Which is true also for `define': in general I write/think about the expression first, and only then the name of the identifier.) Laurent
____________________ Racket Users list: http://lists.racket-lang.org/users