Nikita might comment on whether this is a 5.0-only task. But I am with Michael 
on "var" in the framework. I use "var" declarations a lot in throwaway 
"scripting" code (usually data tasks with DFLib), but in any code that needs to 
be maintained, hiding variable types does complicate code review. That's been a 
source of frustration for me on various projects. And this is especially 
relevant for Cayenne where you want the code to be clear and readable.

Cheers,
Andrus

> On Mar 7, 2024, at 5:52 PM, Michael Gentry <blackn...@gmail.com> wrote:
> 
> Just noticed this merge:
> 
> https://github.com/apache/cayenne/pull/605/commits/99138fbcfe8f23e67805557bfcbca5bb452d8325
> 
> I noticed there are several "var" variables, such as:
> 
>    var orderDbAttribute = getOrderDbAttribute(nodeBuilder.build());
> 
> These won't compile with JDK 8 (introduced in 10). Did the minimum JDK
> change to something higher? The documentation says: Cayenne 4.2 requires
> JDK 1.8 or newer. Looks like 5.x will require JDK 11, so perhaps that's
> what this is about?
> 
> If it is JDK 11+, do we want to allow "var" in the codebase? Makes it
> harder to do code reviews (IMHO).
> 
> Thanks,
> mrg

Reply via email to