lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Apr 25, 2014 at 3:01 PM, Coroutines <coroutines@gmail.com> wrote:
> I agree that documentation is
> good, but I hate to expect it.  I like function names that document
> their use more than documentation that is well written.

Ah... naming things. Very hard. We like to read longer names, fingers
aren't so sure. (The verbal diarrhea of Java comes from easy
auto-completion.)

There are some (limited) conventions, so that a sort() method works
in-place, sorted() returns a sorted copy.  If English were a
highly-inflected language like Latin, we could have great fun using
various verb forms.

Documentation is indeed an issue that I care about, and I'm puzzled
when it simply isn't there. Even if the function names are long and
full of embedded adjectives, I'd like to know exactly _what_ can be
safely passed as parameters.  merge_two_tables_returning_intersection
is probably not a style that would catch on (like name mangling in
C++, except explicit)  And functions hunt in packs, so I'd like to
read about how they work together, preferably as examples [1]

>  If I were a third-party I'd say we both have valid points here.

Definitely the best line today, congratulations!

[1] Tests! People say they are the best documentation, but in practice
they are not easy reading.