fir <
profes...@gmail.com> writes:
> piątek, 28 października 2022 o 21:04:37 UTC+2 Ben Bacarisse napisał(a):
>> fir <
profes...@gmail.com> writes:
>>
>> > i wrote on this in a near thread but to emphasize it
>> >
>> > if you have and in if-expressions it seems that this
>> > and is worse in readability than such form as
>> >
>> >
>> > // a==2 -> !b -> c<0 -> {}
>> >
>> > if(a==2) if(!b) if(c<0) {}
>> >
>> > this is becouse the "and expressions" make some 'chain'
>> > of tests and 'and' kinda hides the nature of it - so conclusion
>> > and is bad,, the chain form is better
>> Everyone reading C should know how && and || work so they should
>> therefore see the "chain" of tests in
>>
>> if (a == 2 && !b && c < 0) { ... }
>
> but this form in unclear imo .. this && is liek arithmetical operators +-*/
> and suggest this is this kind of expression where this and as it was stated its
> rather stream of tests