Call for feedback -- switch expressions in JDK 12

Andy Fendley andy at fendley.com
Thu Feb 27 08:36:48 UTC 2020


Hi Alex,

Been using the new switch expressions in Java 12 and 13 for a bit and really like them. They cut code down code, get rid of break and the expression capability is useful. One issue I have, is that if I need more than one line of code for each case I have to enclose in a block which makes the code really ugly and worse to be honest. Using the old method this was not the case. 

Hope this helps.

Andy






Andy Fendley BEng (Hons) MSc 
_________________________________

Software Consultant

LinkedIN: profile <http://uk.linkedin.com/pub/andy-fendley/6/2/802>
_________________________________

skype	andrewfendley
twitter	@andyfendley
mobile	+44 (0) 7590 726426
__________________________________



More information about the jdk-dev mailing list