Function types versus arrays

Reinier Zwitserloot reinier at zwitserloot.com
Sat Feb 13 00:03:01 PST 2010


Er, okay, same question, but with "Object" as type for both second
parameters. In editing it to look a bit more like a real situation I added a
distinct post-erasure type by accident. As if you didn't know what I was
asking.


--Reinier Zwitserloot

Need to receive donations via the web?
Check https://tipit.to/



On Sat, Feb 13, 2010 at 7:39 AM, Neal Gafter <neal at gafter.com> wrote:

> On Fri, Feb 12, 2010 at 8:22 PM, Reinier Zwitserloot
> <reinier at zwitserloot.com> wrote:
> > However, if function types aren't reified, then arrays are the least of
> my
> > worries. Does that mean something like this:
> > void print(#(Number)String formatter, Number number) {
> >     System.out.println(formatter.(number));
> > }
> > void print(#(String)String formatter, String string) {
> >     System.out.println(formatter.(string));
> > }
> > is not legal (if this is done like generics, the signatures are equal
> > post-erasure, which is a compile error).
>
> These signatures are distinct post-erasure, because the erasure of
> their second parameters are distinct.
>


More information about the lambda-dev mailing list