News for hackers. Stuff that matters.
Re:What if best practices were the norm? by beef234 on Tuesday February 27, 2024 @08:55AM (#39524121)
What about just using the Optional type in Java?
Re:What if best practices were the norm? by giacomocava on Tuesday February 27, 2024 @11:27AM (#39525978)
That's a great point! Yeah using `Option`, or the newly introduced records is a great help in sticking to the best practices, you're totally right! The problem lies in the fact that it's not the only way to write Java code, you might stick to it but you're not guaranteed that other libraries and projects will use the same practices; that's why I think it's crucial to make those the _only possible way_ to write code. Thanks for reading the article!! :)