Given the similarity in syntax, I'd expect it to behave the same as a
normal if ... end

On Sat, Mar 22, 2014 at 12:05 PM, Jacob Quinn <quinn.jac...@gmail.com> wrote:
> What would return from the statement if it were false? nothing? Like if I
> use it assigning a variable? I definitely see the attraction as a one liner
> though.
>
> -Jacob
>
> On Mar 21, 2014 9:52 PM, "Chris Foster" <chris...@gmail.com> wrote:
>>
>> On Sat, Mar 22, 2014 at 9:23 AM, Stefan Karpinski <ste...@karpinski.org>
>> wrote:
>> > I kind of like that idea, actually.
>> >
>> > On Fri, Mar 21, 2014 at 5:10 PM, Matt Bauman <mbau...@gmail.com> wrote:
>> >>
>> >> I quickly acclimated to Stefan's && idiom and now happily read and
>> >> write
>> >> code containing it.  That said, it did throw me for a loop when first
>> >> learning the language.  I'm not too big of a fan of reserving another
>> >> keyword for an optional syntax... but I could perhaps support its
>> >> inclusion if
>> >> it were *only* for one-line if statements and didn't require a
>> >> terminating
>> >> `end` (and had no support for else/elseif clauses):
>>
>> +1  I've no personal problem with the idiomatic version using && but
>> in the interests of making compact code which is also readable by new
>> users I think this would be a good step.  It's great to not have to
>> trade off legibility against compactness.

Reply via email to