| I'll give you an inverse argument... In 6.0 (this is all already implemented btw) you can do all kinds of things with dynamic instantiation (extra features) that the spec actually explicitly says you should not be able to do[1]. We offer these as value-add. Since these value-adds are technically illegal according to the spec, should we just drop them? (rhetorical question - I'm not dropping those new features) [1] Few examples:
- In JPA, if you use a dynamic-instantiation it can be the only return. IOW select new DTO(...) from... is fine, but select a.prop, new DTO(...) from ... is not
- In JPA, dynamic-instantiations cannot be nested. IOW, according to JPA this is illegal but we suppport in 6: select new DTO( newDTO2(...), ...) from ...
- In JPA the DTO must have a matching constructor. In 6 we also support dynamic-instantiation through no-arg ctor + setters.
Again, all of this is not required by the spec. In fact, one could easily argue that the spec explicitly says they are not legal. So should we drop things like this as well? |