<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 3:46 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@ccs.neu.edu" target="_blank">samth@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Jun 10, 2013 at 9:09 AM, Matthias Felleisen<br>
<<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>> wrote:<br>
><br>
> On Jun 10, 2013, at 8:51 AM, Laurent wrote:<br>
><br>
> On Sun, Jun 9, 2013 at 7:54 PM, Matthias Felleisen <<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>><br>
> wrote:<br>
>><br>
>> (struct-open item item1 weight value volume)<br>
><br>
><br>
> I would love to see such an addition to core Racket!<br>
><br>
> It's on my todo-list.<br>
<br>
</div></div>I don't understand what's better about `struct-open` than:<br>
<br>
(match-define (item weight value volume) item1)<br>
<br>
which is a far more general form. I don't think we should add a<br>
version of `match-define` specialized for structs unless there's a<br>
particular need for it.<br></blockquote><div><br></div>Yeah, you're probably right; There's no real need when you have<br> `match-define'. Though I prefer the order of the arguments in <br>`struct-open', because in general I write the `item1' first and then <br>
go back to writing the new bindings. (Which is true also for <br></div><div class="gmail_quote">`define': in general I write/think about the expression first, and only <br>then the name of the identifier.)<br></div><div class="gmail_quote">
<br></div><div class="gmail_quote">Laurent<br></div><div class="gmail_quote"><br></div><br></div></div>