lua-users home
lua-l archive

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


On Thu, Oct 18, 2012 at 2:45 PM, Joshua Phillips
<jp.sittingduck@gmail.com> wrote:
>
>> It would allow me to do:
>>
>>   if     ( passed, z = myFunction(x, y) )
>>      and ( passed, q = mySecondFunction(z) )
>>      and ( passed, result = myThirdFunction(q) )
>>
>> which is a lot more comapct than what I'm writing at present.
>
> Compact, maybe. It's much better to make software easy to read, and that
> doesn't necessarily mean making it compact.
>

What he wants is the equivalent of Scheme's and-let* or Haskell's
Maybe monad. Both are a pleasure to read. Lua just lacks it.

-- 
-alex
http://www.artisancoder.com/