Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: Understanding && Date: Sun, 18 Apr 2021 00:49:08 +0200 Lines: 28 Message-ID: References: <87wnt2e06e.fsf@bsb.me.uk> <87mttydm95.fsf@bsb.me.uk> <87o8edd8qk.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net FDAiIUPqP60UygmoRtyLTQhwdhYThZMk0jQDYOQ6YapV+mtgZO Cancel-Lock: sha1:n8/AIUDIyxn58AEAhqo26seXDlw= In-Reply-To: <87o8edd8qk.fsf@bsb.me.uk> Xref: csiph.com comp.lang.javascript:39971 Ben Bacarisse: > Jon Ribbens writes: [...] >> It's not a rule of mine, it seems to be a rule of almost everyone. > > The trouble is that a non-trivial number of languages have this form, Yes - but this is more a side effect than a intended way to use those languages. [...] > I've seen (and, dare I say, written) code that uses the result. I > wonder if that absolves the programmer from the charge of abuse: > > return (data = parse_input(file_name)) > && (result = transform(data)) > && write_file(file_name); In a polite way I'd say this is the result of someone who is really lazy and want's to avoid typing as much as possible. That's ok if you do a project just for yourself. But as soon as you need to work in a team, readibility *is* more important than having the shortest possible code. -- Arno Welzel https://arnowelzel.de