Fwd: Remi's comments on Any
Gavin King
gavin at hibernate.org
Mon Jan 5 11:35:03 UTC 2015
On Mon, Jan 5, 2015 at 12:27 PM, Remi Forax <forax at univ-mlv.fr> wrote:
> and the best way to avoid concrete instantiation of ArrayList<Any>,
> is not to use a *use-site* annotation like a wildcard but a *declaration
> site*
> like
> class ArrayList<any T> { ... }
I don't see how that's right. Then how would I write down the
instantiation ArrayList<? extends Any>?
When I'm saying we don't necessarily need to let you write:
ArrayList<Any> list = new ArrayList<Any>();
I'm not saying we don't need to let you write:
ArrayList<? extends Any> list = new ArrayList<int>();
I don't understand how you're proposing to write this second example.
> boxing make ArrayList<Any> is not too different from ArrayList<Object>,
> and tagged union will only happen in an alternate universe (never say
> never).
I still don't understand the resistance to the tagged union Any. It's
surely way, way, way easier to implement than the value types
proposal, and could be implemented at the same time.
--
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
More information about the valhalla-dev
mailing list