Skip to Content.
Sympa Menu

sm-sorcery - [SM-Sorcery] Preferred coding style for if tests

sm-sorcery AT lists.ibiblio.org

Subject: Discussion of Sorcery related topics

List archive

Chronological Thread  
  • From: Ondra Tomecka <otom7630 AT lucy.troja.mff.cuni.cz>
  • To: SourceMage Sorcery List <sm-sorcery AT lists.ibiblio.org>
  • Subject: [SM-Sorcery] Preferred coding style for if tests
  • Date: Wed, 28 Jan 2004 17:22:48 +0100 (CET)

Hi,

Just a quick question, which may unleash a flamewar ;-)
Is there preferred style for writing tests?

I mean should I use for patches this form:
-------------------------------------------
if [ some_test ]; then
do_some_simple_command
fi
-------------------------------------------

or just

[ some_test ] && do_some_simple_command

What are the opinions?

I used to write with C and C++, so I'm used to former version, but
recently (blah, 2 years already) I'm working mostly with scripts where the
latter form is possible.

Andy





Archive powered by MHonArc 2.6.24.

Top of Page