* Paul ([EMAIL PROTECTED]) [27 Jun 2001 00:50]:
> --- iain truskett <[EMAIL PROTECTED]> wrote:
> > * Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]:
[...]
> I always used the second in C, but once I started using Perl and Java
> I kept finding something happening that made it seem more consistent
> to me to switch to the K&R style. I can't remember what it was for the
> life of me, though. =o)

I started with K&R style. I found it not quite to my liking. Took one
look at GNU and found it deeply ugly to my eyes. So I currently use my
own style, whatever that may happen to be (I've an indent configuration
file that has most of it).

I only tend to step out of that style when I'm coding for something that
has its own guidelines (and I tend to just run indent over what I've
done anyway). The only time I've had to write perl in a place with
coding guidelines, I'd written the guidelines =)

> Regarding perlstyle, I personally find that K&R style reads better with
> what Larry calls "cuddled elses" -- 
[...]

Normally, I use:

if ($x)
{
   do this;
   do that;
}

I use cuddled if what I'm doing would look silly otherwise. e.g.

if ($blah) {
    one line;
} elsif ($flurp) {
    one line;
} else {
    one line;
}

> Now it's just habit, and I try to be consistent. =o)

I'm consistent to the context. Just like perl =)


-- 
Just another contextual hacker,
iain.                                          <http://eh.org/~koschei/>

Reply via email to