cos-guidelines icon indicating copy to clipboard operation
cos-guidelines copied to clipboard

Using short-curcuit logical operators

Open daimor opened this issue 10 years ago • 4 comments

Using short-curcuit logical operators ("&&" and "||") instead of regular ("&" and "!")

daimor avatar Dec 14 '15 07:12 daimor

Hmm, this is rather obvious and of kind of programing techniques, not the syntax guidelines?

Should we go into busines of teaching people how to program more effecient programs in style guidelines?

[Yes we should eventually write such set of tips, but it will be formed as wiki, not interntionally small style guide]

tsafin avatar Dec 14 '15 07:12 tsafin

Let's introduce code best practices repo for this kind of stuff?

понедельник, 14 декабря 2015 г. пользователь Timur Safin написал:

Hmm, this is rather obvious and of kind of programing techniques, not the syntax guidelines?

Should we go into busines of teaching people how to program more effecient programs in style guidelines?

[Yes we should eventually write such set of tips, but it will be formed as wiki, not interntionally small style guide]

— Reply to this email directly or view it on GitHub https://github.com/intersystems-ru/cos-guidelines/issues/10#issuecomment-164371406 .

evshvarov avatar Dec 14 '15 08:12 evshvarov

for example C# guidline also has such rule

daimor avatar Dec 14 '15 08:12 daimor

I'd rather use Wiki in the same repo for this purpose.

tsafin avatar Dec 14 '15 08:12 tsafin