On Tue, 9 Mar 2021 20:52:19 GMT, Mark Sheppard <mshep...@openjdk.org> wrote:

>> The disadvantage is that it would add another level of braces.
>
> maybe ... I find it would provide an easier flow to code  ... an "easy on the 
> eye" call flow linkage - the variable is declared and then used  .... instead 
> of the disconnect of throwing an exception or non immediate use of the 
> variable. 
> 
> but sure,  isn't code somewhat idiosyncratic!!

The first few times I looked at this pattern, I did stumble over it somewhat. 
But since then, I find it natural enough and easy to follow. Maybe the concern 
is transient in nature, until the instanceof pattern matching feature is more 
widely used.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2890

Reply via email to