Reply to post: Re: Python whitespace

Official: Perl the most hated programming language, say devs

DCFusor

Re: Python whitespace

I agree that good indenting should always be done. But when things span multiple pages, it's darned hard to keep track of if it's the only thing defining scope. I often add "picky perfect" indenting before I'm done in whatever language.

I do have a use-case where it's actually a serious problem - I wrote a perl program to plot data from my fusor in 4 dimensions, mapping perhaps 10 or so parameters into 4d (x,y,z,color). To make this useful for the scientist (me) - I have the axis mapping set up so that I can type in a line or few of perl per axis, defining how the mapping is (with presets for the common setups, using Storable). If I had to use newlines here, I'd have to use full edit boxes in GTK and the extra complexity that entails, along with wasted screen space, to accommodate python there. Wheras in Perl, and most any other sane language, a semicolon will do - code ISN'T POETRY where a newline controls formatting, or it shouldn't be IMO, anyway. And I'd like to be able to split long lines sometimes too, with minimal fuss.

But, horses for courses, as they say. In my case, I can handle about any language, but my many years of learning not only languages but libraries makes me not want to have to start all over when what I have now works as well as, or better, than the language of the day.

Being able to go from zero to hero fast as in python seems to encourage more monkies to use it.

I cite nearly 100% of the hardware interface code for say, raspberry pies, where no one seems to get the concept of a ready flag vs a "keep increasing the sleep time till it works on this cpu at this speed".

(And no where else...and breaks if the speed changes)

Monkey code doesn't encourage me to go through the learning curve on yet another. I sat Java out too - and it turned out to be a wise move.

Not that you can't write horrible code in any language...it's just that "new lang of the day" does tend to get the beginners who can't code well yet, and many of whom will drop out when they find out they'll never be good at it (or their employers figure that out).

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon