lua-users home
lua-l archive

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


Axel Kittenberger <axkibe@gmail.com> writes:

>> There is a difference between picking the more confusing of two
>> technically equivalent options, or picking the technically better option
>> and document its potential for confusion.
>
> Indeed! One allow chaining, the other doesn't. Which technically the
> better option?

One is a procedure which has a read/write parameter passed by reference
as its principal input and output.  The other is a function which has
its return value as its principal output, but changes its input, passed
by reference, as a side effect.  Conceptually a mess with redundant
double output, for the sake of being able to squeeze more code into a
single line at the cost of comprehensibility.

Overengineering is not the same as "technically superior", and Lua is
not APL.  The mark of technically superior solutions is that they
require less rather than more intelligence to understand.  That is not
to be confused with the amount of intelligence they require to create.

Intelligence needs restraint, or its potential is locked away behind the
event horizon of incomprehensibility.

-- 
David Kastrup