[NCLUG] Looking at programming languages...
Sean Reifschneider
jafo at tummy.com
Wed Jan 16 20:33:53 MST 2008
On Wed, Jan 16, 2008 at 05:00:39PM -0700, Michael Milligan wrote:
> My biggest problem with Python was the rigid indent style forced upon me,
I anticipated having a problem with the indentation, but when I started
writing Python I found that I didn't have to adjust my indentation style at
all what I was using in C. What I did find was that it was impossible to
make mistakes like I'd made in the past:
if (condition)
if (othercondition) code();
#oops, need an else here so during maintenance I add:
else someothercode();
In C the else goes with the othercondition else. In Python, it looks at
the indentation and does what I had intended. Of course, you can
compensate for this by always adding braces in languages that use them.
That's the habit I've been using since I got bitten by the above back in
the <gasp> '80s.
So, if your biggest problem with Python is the enforced indentation, then
either:
You're blessed to have so few problems.
or:
You really need to obtain the habit of a good indentation style.
Sean
--
"If you're really us, what UDP port do you use?" "TFTP, dudes!"
-- Scott Kleihege, 2005
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
More information about the NCLUG
mailing list