Comment by CRConrad

5 years ago

> ...many functions are insufficiently explained by [naming and set of arguments] alone unless you want four-word camelcase monstrosities for names.

Come now, is four words really all that "monstrously" much?

> The code of the function should be right-sized.

Feels like that should go for its name too.

> Size and complexity need to be balanced there- simpler and easier-to-follow is sometimes larger.

The longer the code, the longer the name?

Quite a bit of sentiment around against long names, I personally am fine with them up to about 30-35 chars or so, then they start to really intrude. Glad you’re not put off by choosing function over form!

  • Stretch it to 36, and that is four not-all-that short words, at 4× 9 = 36 letters. Form and function! :-)

    So it gets monstrous only from five words upwards or so... But still, I think I may by sheer coincidence have come up with a heuristic (that I'm somewhat proud of): The more convoluted the logic = the longer the code needed to express it ==> the longer a name it "deserves".