flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mihai Chira <mihai.ch...@gmail.com>
Subject Re: git commit: [flex-tlf] [refs/heads/develop] - FLEX-34807
Date Mon, 21 Sep 2015 11:08:29 GMT
Cool, thanks for the explanation.

On 21 September 2015 at 11:57, Harbs <harbs.lists@gmail.com> wrote:
> Yes. It’s a coding style I picked up quite some time ago. It assigns the value to itself
if destinationLeaf is null.
>
> It avoids writing an extra “if” (and keeps everything in one line while keeping the
declaration at the beginning of the line).
>
> It might be a bit confusing the first time you see it, but I think it’s pretty easy
to read once you are familiar with the style.
>
> On Sep 21, 2015, at 12:46 PM, Mihai Chira <mihai.chira@gmail.com> wrote:
>
>> Is this line only confusing for me? var
>> destinationParagraph:ParagraphElement = destinationLeaf ?
>> destinationLeaf.getParagraph() : destinationParagraph;
>>
>> Is this the intention? if (destinationLeaf) destinationParagraph =
>> destinationLeaf.getParagraph();
>

Mime
View raw message