15
LLAMS
5y

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*

Comments
  • 4
    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.
  • 1
    Did you meant NSA lambda ?

    We rewrote CGI so now everyone can provide their data to us more easily.
    😅
  • 0
    @vane
    You mean NSAWS?
  • 0
    @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.
  • 0
    @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.
  • 2
    @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.
Add Comment