Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    Is this answer meant to be sarcastic? Commented Apr 29, 2020 at 22:28
  • 2
    I was wondering that too. "I set up my IDE to play an air-horn noise whenever I type 'class', and now I agree that Java is too verbose" Commented Apr 29, 2020 at 22:30
  • 2
    I've edited my answer. I'm not entirely sure what was originally sarcastic about it. Some feedback as to why you thought that would be nice. Hopefully this answer does not come off as sarcastic. I'm a fan of Dan Saks who says if you are arguing you're losing. Commented Apr 30, 2020 at 2:04
  • 1
    Um, I think you're missing a concept here. You've got a variable that stores "either a dotted IP address or a hostname". And your objection is that you can't refer to that easily by a single variable name. Variables are supposed to hold one thing. What is that one thing? Is it "ServerToConnectTo", "ClientAddress", etc? Because if it's "hostname or a dotted IP address", you're either using one variable for two things or you're thinking of your variable the wrong way. Commented May 1, 2020 at 14:49
  • 1
    I agree with Kevin, all you've done is encoded the comment as a variable name, rather than actually trying to eliminate the need for it. Choosing a more meaningful name isn't a separate concern to put off until later, it's the whole aim of the exercise. Indeed, eliminating the comment might need more than a variable name - should the variable be a stricter type, or more clearly validating against its expected format before use? What previous changes led a variable called ip to not always be an IP address, and have those changes actually been followed through properly? Commented May 1, 2020 at 21:55