Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				Eurgh, I hate this "var" crap in Java. Aside from in *really* obvious cases, it's a near enough automatic code review fail in our team.
- 
				
				 vane104866yDid you meant NSA lambda ? vane104866yDid you meant NSA lambda ?
 
 We rewrote CGI so now everyone can provide their data to us more easily.
 😅
- 
				
				 LLAMS36116y@AlmondSauce Id hate to be on your team. IMO with the addition of var Java now has the perfect level of type safety for my liking. I can strongly type my params etc without having to write out every type for every local variable. If Im using it on the next line its pretty convienient to not have to fully specify what type it is. Virtually every other language worth mentioning has this level of type inference. LLAMS36116y@AlmondSauce Id hate to be on your team. IMO with the addition of var Java now has the perfect level of type safety for my liking. I can strongly type my params etc without having to write out every type for every local variable. If Im using it on the next line its pretty convienient to not have to fully specify what type it is. Virtually every other language worth mentioning has this level of type inference.
- 
				
				@CrashOverride "If Im using it on the next line its pretty convienient to not have to fully specify what type it is."
 
 Sure, and if that's the case, I don't have a problem with it (that counts as obvious.) But I *do* have a problem with this new wave of Java programmers who seem to think it's appropriate to replace any and all type declarations with var wherever the compiler allows. That just turns code into an unreadable mess.
- 
				
				 LLAMS36116y@AlmondSauce Yeah the issue I have is where you have a line thats like LLAMS36116y@AlmondSauce Yeah the issue I have is where you have a line thats like
 
 SomeTypeName someTypeName = new SomeTypeName();
 
 Its like how many times can I type the same thing on one line. The variable name and assignment should be enough to tell me what it is and what its for.
Related Rants





 Coworker's whiteboard today
Coworker's whiteboard today
Me: *Writes a nice little AWS Lambda service using Java 12*
Reviewing Dev: Lambda only supports JDK 8
Me: *Dies inside and cries as I replace every occurence of var*
rant
lambda
aws
java