you could wrap the struct into the generated class, a la
java.lang.Integer and other boxed structures when needed. I suppose
for the simple cases (Comparable, hashCode, equals), escape analysis
would make the performance pretty good

On Mon, Dec 7, 2009 at 5:13 PM, John Cowan <[email protected]> wrote:
> On Mon, Dec 7, 2009 at 2:49 PM, Jon Harrop <[email protected]> wrote:
>
>> Users will want custom comparison, equality, hashing and serialization for
>> their structs.
>
> Equality can be structural, and hashing can be straightforward.
> Serialization can be default.  If you want structs, you have to play
> nice.  The more serious problem is putting a struct into a collection,
> which wouldn't work under this interpretation.
>
> Comparison, maybe, although Comparator would cover it.
>
>>
>> --
>> Dr Jon Harrop, Flying Frog Consultancy Ltd.
>> http://www.ffconsultancy.com/?e
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "JVM Languages" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/jvm-languages?hl=en.
>>
>>
>>
>
>
>
> --
> GMail doesn't have rotating .sigs, but you can see mine at
> http://www.ccil.org/~cowan/signatures
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "JVM Languages" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/jvm-languages?hl=en.
>
>
>



-- 
http://mapsdev.blogspot.com/
Marcelo Takeshi Fukushima

--

You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.


Reply via email to