Fale Conosco

EU VI NA TV

Java is mounting a huge comeback

Java Burn

Java is mounting a huge comeback

it is June 5th 2023 and you’re watching the code report Java is hands down my all-time favorite programming language to make fun of python developers roast it for having so much boilerplate see developers laugh at absurd class names like abstract Factory manager Singleton service manager Factory C plus plus developers hate that you can’t blow your legs off with memory management as easily and JavaScript developers are still trying to fix things like dates they copied from java over 20 years ago unfortunately I have some bad news public static void main string arcs will no longer be a requirement to write hello world in Java 21 rendering an entire industry of java boilerplate memes static null and void and that’s not good for people like me who make a living making fun of java because I need that boilerplate to put food on my family it’s great news however for anyone who wants to learn Java or more accurately anyone who’s forced to learn Java this new feature is called unnamed classes and instant main methods and allows you to create a main method without a class and public static void mainstream arcs this is a great change but I think we could actually make things a little bit better by also removing void and actually why do we even need a main function in the first place we could get rid of that altogether system out seems a little unnecessary there should just be a global print line function and if we rename it to print we then get a perfect language c-sharp introduced top level statements in 2020 and maybe in another 10 years Java will get there too before you get too excited though this feature is primarily designed to make learning Java more accessible to beginners the real boilerplate is not going anywhere in addition Java is primarily used in Enterprise which is very slow to adopt new features there are tons of mission critical applications out there still running Java 8 and it could be years or even decades before these new features get adopted but Java 21 also has some other cool updates like structured concurrency that allows you to run multiple concurrent jobs on multiple threads while treating them as a single unit of work but another thing you might find kind of crazy about Java is that it doesn’t natively support string interpolation which means you need to concatenate a bunch of strings together like you’re in kindergarten or use string.format which is also kind of annoying but in Java 21 we have a new string templates feature which is a new kind of expression that allows you to insert values directly into Strings we’ve come full circle to where Java is now looking more like JavaScript and JavaScript is looking more like Java and I even noticed that Java recently updated their website so now it only looks 10 years out of date instead of 20. this is a big strategic move that has caused Oracle stock to almost double over the last year the big question though is with all these awesome new features should you learn Java in 2023 when it comes to working as a programmer you should choose a field that’s well paid interesting and legal but the reality is that you can only choose two of these Java is well paid and legal but not very interesting when looking at the syntax alone Java is pretty ugly if I want to write code for the jvm for fun I’d much rather use a language like kotlin or Scala that being said Java is still a Powerhouse language when it comes to Enterprise software it’s used extensively at companies like Twitter and Google because it’s a very well balanced language it’s performant enough for most things it’s relatively easy to use and most importantly has a huge ecosystem of stable libraries and Frameworks a few days ago I ran a poll for the best programming language of all time and Java came in dead last but now that we no longer need public static void main string args I think it’ll reclaim the top spot and when with that being said I’d like to officially announce my retirement from making fun of java but let’s enjoy these Java memes together one last time like this one that explains how object-oriented design patterns are often unnecessary and counterproductive when you could just be using simple variables and functions this next meme is a good one but you wouldn’t get it so I’m not even going to try to explain it if you like Windows you might like Java because it loves to force you into annoying updates all the time and as you gain more experience as a programmer you’ll eventually find out that everything doesn’t need to be an object because these objects will pile up and devour your RAM and finally it’s important to realize that not every meme is a joke many of them are a legitimate cry for help this has been the code report thanks for watching and I will see you in the next one


To Top