Not having type inference has made me grumpy about working on our codebase vs. 
tinkering in C# for the past decade. So you can guess where I stand on that. :)

I'm all for us adopting it in scenarios where the type of an object is 
immediately obvious (i.e. doesn't require navigation to a method or function 
call to determine what it is); it cuts out a lot of redundant boilerplate.

As I typed that out, I realized intellij likely has type hints as well that one 
could use to bridge that gap as well in non-obvious situations.

On Tue, Oct 29, 2024, at 1:13 PM, Štefan Miklošovič wrote:
> Hello,
> 
> this should give you an idea
> 
>  grep --include '*.java' -r 'var ' src/ test/ 
> 
> I think this is a new concept here which was introduced recently with support 
> of Java 11 / Java 17 after we dropped 8.
> 
> What is your opinion? Are we free to use it wherever we want? I am quite 
> conservative in this area and I will most probably still use types as we know 
> them but maybe in tests we might relax it a little bit? Or production code 
> with "var" is totally fine too without any concerns? I think this should be 
> covered by the code style.
> 
> Regards

Reply via email to