On Fri, 2002-01-04 at 12:56, Larry Price wrote:
> <pythangelism>
> In Python the indentation has a syntactic meaning, like curly braces and
> semicolons do in most of the C family of languages. So unless you feel
> constrained by the need to match braces, or end statements with semicolons
> it's not _that_ painful.
i never thought or suggested that python was painful. it looked pretty
nice and relatively easy to learn. but python contrains you to a _style
of coding_ as syntax, instead of syntax as syntax. for instance, in
perl, if i want to create a subroutine, i can do it in several different
ways :
sub something1{do something;do something else; do more;}
sub something2 {
do something; do something else; do more;
}
sub something3 {
do something;
do something else;
do more; }
sub something4
{
do something;
do something else;
do more;
}
ad nauseum... and have each of them work in the same program.
> Most pythonistas use a syntax aware editor (emacs,vim, textpad) and just
> type in the code as they think it, the big difference is that when they go
> back to look at what they did earlier, it's much easier to find the spot
> where things go wrong, and very much easier to see where you've structured
> the code weakly.
i use "nedit", which is syntax aware. i also type in perl code as i
think it. and if i format it so i can read it (the way the rest of my
code, in whatever language save python, is written) it's easy to go back
and find mistakes. just as easy to find weakly structured code. i like
being able to apply the same style and whitespace rules i use in VBA to
my perl code (yes, it does work! and i can provide examples if
needed...)
i can see times where having whitespace with syntactical meaning would
be a serious pain in the ass, just like arcane syntax can be a pain in
the ass.
> Also the fact that a fairly large and active community has made a clear
> decision on code formatting means that community can survive without
> having endless code formatting holy wars...;-)
> </pythangelism>
i would have thought it would be the other way around...
what if you decide that the current whitespace rules make certain things
ugly, clumsy, or just plain unreadable? you can't just change it to
make it look better for you. you have to follow someone else's rules or
suggest and wait for a change to be made (which may never be made...)
> > python does seem to be quite popular, so i may include it anyway,
> > depending on the "package" size (in k).
> Python-2.1.1.tgz weighs in at 6056 k
relatively light (these days, at least...) in it goes.