Sounds good. I was just thinking that a lower level implementation could avoid the need to create a vector just to get the variant. But for my code it's no big deal.<br><br><div class="gmail_quote">On Tue, Nov 10, 2009 at 11:21 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Tue, Nov 10, 2009 at 12:18 PM, Doug Williams<br>
<div class="im"><<a href="mailto:m.douglas.williams@gmail.com">m.douglas.williams@gmail.com</a>> wrote:<br>
</div><div class="im">> Robby,<br>
><br>
> I am going to add your variant procedure to the describe collection.<br>
<br>
</div>Great!<br>
<div class="im"><br>
> Are you<br>
> happy with the name 'variant' and the contract (-> any/c symbol?)?<br>
<br>
</div>Yes. (You may want to use substring isntead of regexp-match.)<br>
<div class="im"><br>
> What is<br>
> the relationship between this and object-name?<br>
<br>
</div>Nothing really. object-name is per-object (and not everything has a name).<br>
<div class="im"><br>
> It seems that for actual<br>
> structs they return the same value. Would it make sense to change<br>
> object-name to return the same value as variant in those cases where it<br>
> (i.e., object-name) returns #f? This would trivially make this functionality<br>
> available in #lang scheme, which seems to be a good thing.<br>
<br>
</div>I don't think that that change is really a good idea at this point.<br>
Probably would break lots of stuff.<br>
<font color="#888888"><br>
Robby<br>
</font><div><div></div><div class="h5"><br>
> Doug<br>
><br>
> On Tue, Nov 10, 2009 at 7:43 AM, Robby Findler <<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>><br>
> wrote:<br>
>><br>
>> On Tue, Nov 10, 2009 at 8:41 AM, Dave Herman <<a href="mailto:dherman@ccs.neu.edu">dherman@ccs.neu.edu</a>> wrote:<br>
>> >> This probably doesn't help Doug, but here is another way to define the<br>
>> >> function linked above:<br>
>> ><br>
>> > That's neat, thanks! Has struct->vector always worked on non-structs?<br>
>><br>
>> I'm not sure about always, but at some point a while ago, Matthew<br>
>> decided that all values are structs (in the sense that you could have<br>
>> implemented everything with structs and scope, etc even if some of<br>
>> them are implemented in C) and adapted the primitives to make them<br>
>> behave accordingly.<br>
>><br>
>> Robby<br>
><br>
><br>
</div></div></blockquote></div><br>