Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're not the first to comment like this (see the comments below the article). I was surprised to see how many people pay too little attention to naming of variables, methods and classes in object-oriented programming. I strongly believe that a wrong name can play a key role in a good design, as well as a bad name can ruin the entire project.


Yeah I actually went back and looked through that comment section afterwards. The responses from the author were super disappointing.

While I agree that the naming of variables is vastly more important than some (most?) people think, tossing convention without any actual rules for what should replace it is pretty worthless.

The immutability argument was actually novel to me and something that I actually found to be an interesting shift in thought process. However, the change from: Ball ball = dog.getBall(); to: Ball ball = dog.give();

totally destroys any readability. Give returns an object? That object is a ball? What?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: