Another oddity, that I find hard to explain away:

Coffer<String> ~= String

This seems to be a bad property, as you have two types to name the same thing.

You could, in principle, say that the type parameter of Coffer is restricted to... values.

But here's the second, pedagogical oddity: Coffer<Value> looks an awful lot like a specialized generic type. I think people will be surprised in seeing that this magic types works, while the types they want (List<Value>) does not.

Besides...

List<Coffer<Value>>

is reeeallly verbose, do we really want to read code like that?

At the language level, the number of exceptions this will require all over the place, from generic well-formedness to inference (imagine passing a 'Value' where a Coffer<Z>) is expected, that, while I can sympathize with your opening position of '?' being confusing, it seems the proposed cure is worse than the disease :-)

Maurizio


On 08/05/2019 23:12, Remi Forax wrote:
There are two oddities:

Reply via email to