602
No comment (lemmy.nz)
you are viewing a single comment's thread
view the rest of the comments
[-] glibg10b@lemmy.zip 7 points 2 weeks ago

I’d rather the code itself is readable with well-named variables and methods.

Unfortunately, sometimes a level of specificity is needed that can't be expressed in a method name alone, unless you make that method name super long. The method name can't always convey:

  • Time and space complexity
  • Side effects
  • Thread safety
  • Possible exceptions
  • Preconditions and postconditions
  • Edge cases

Sure, some of this can be communicated in the implementation, but that means that users need to control-click the function instead of just hovering to see the comment. And sometimes the implementation is a secret or at least in a different file from the declaration

this post was submitted on 25 Sep 2026
602 points (98.9% liked)

Programming Humor

3506 readers
7 users here now

Related Communities !programmerhumor@lemmy.ml !programmer_humor@programming.dev !programmerhumor@kbin.social !programming_horror@programming.dev

Other Programming Communities !programming@beehaw.org !programming@programming.dev !programming@lemmy.ml !programming@kbin.social !learn_programming@programming.dev !functional_programming@programming.dev !embedded_prog@lemmy.ml

founded 3 years ago
MODERATORS