If there are so many parens that we require an editor to disambiguate them, it's too dense. Add whitespace or decompose the expression until readable.
On Thu, Feb 16, 2017 at 3:15 PM, Mike Hommey <m...@glandium.org> wrote: > On Fri, Feb 17, 2017 at 12:10:32AM +0100, Jean-Yves Avenard wrote: >> reading this: (turn on courier) >> >> return ((aCodecMask & VPXDecoder::VP8) >> && aMimeType.EqualsLiteral("video/webm; codecs=vp8")) >> || ((aCodecMask & VPXDecoder::VP9) >> && aMimeType.EqualsLiteral("video/webm; codecs=vp9")) >> || ((aCodecMask & VPXDecoder::VP9) >> && aMimeType.EqualsLiteral("video/vp9")); >> >> than: >> return ((aCodecMask & VPXDecoder::VP8) && >> aMimeType.EqualsLiteral("video/webm; codecs=vp8")) || >> ((aCodecMask & VPXDecoder::VP9) && >> aMimeType.EqualsLiteral("video/webm; codecs=vp9")) || >> ((aCodecMask & VPXDecoder::VP9) && >> aMimeType.EqualsLiteral("video/vp9")); >> >> where does the || apply, where does the && ? >> I must recompose the entire expression in my mind to understand what's going >> on. >> The previous one require no such mental process. > > ... assuming the indentation and use of parens is correct, which it > might not be, so you still have to look closely. > > Which brings an interesting observation: the review tools are not > helpful in that situation, while a local editor would allow you to know > which closing parens corresponds to which opening one. > > Mike > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform