Re: help with lua style and syntax
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: help with lua style and syntax
- From: Alex Queiroz <asandroq@...>
- Date: 2012年10月18日 14:50:09 +0200
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/