Python and Ruby
waku at idi.ntnu.no
Tue Feb 9 10:51:57 CET 2010
On Feb 2, 10:49 pm, Jonathan Gardner <jgard... at jonathangardner.net>
> On Feb 2, 2:21 am,waku<w... at idi.ntnu.no> wrote:
> > there are languages where indentation can be either enforced and allow
> > one to omit some syntactic nuissance like braces or begin-end clauses,
> > or made optional, requiring other syntactic means for delimiting
> > blocks etc. (consider f# with its #light declaration, for example.)
> If you're writing "experimental code", you're doing it wrong. Every
> line of code you write may end up on the space shuttle one day (so to
> speak!) Why not write the code well-formatted in the first place, so
> that any bugs you introduce are as easily visible as possible?
you're missing the large part of the language's customers that use it
specifically for experimenting. they're not developing space
shuttles, but rather explore available data, experiment with
algorithms, etc. (and for space shuttles, i doubt python is the first
yes, i am writing lots of experimental code, and i know many who do,
too, and there is *nothing* wrong about it. and then, i sometimes use
ipython to interactively experiment, saving the input to a log file,
and editing it afterwards as needed. and just the mere fact that i
*have* to adapt my editor to ipython's indentation policy (or vice
versa) whenever working with others' code because otherwise the code
fails, is fairly annoying. there is nothing wrong or stupid about the
editor in this respect.
> The only reason why you may want to write crap code without proper
> formatting is because your text editor is stupid.
'proper' formatting is, in some languages, something achieved by
simply running a pretty formatter. in some, it's the job of the
programmer. it has nothing to do with the claimed stupidity of the
> If that's the case,
> get rid of your text editor and find some tools that help you do the
> right thing the first time.
> If you're text editor has a problem with indenting, you have a
> terrible text editor. Period, end of sentence.
you're just wrong.
> You can't screw in bolts with a hammer, and you can't level with a
... and you can't freely format you code with python.
> Don't try to write code in any language without a real text
'real'? meaning one able to guess how to combine code from multiple
developers with different indentation policies, for example, one using
tabs, another four spaces, and yet another eight? (which is not at
all uncommon, and not quite wrong or stupid.)
> editor that can do proper indentation. Don't let your teammates use
> deficient text editors either. I wouldn't appreciate it if I delivered
> precision components that my teammates tried to install with
> This is the 21st Century. Good text editors are not hard to find on
> any platform.
'stupid', 'wrong', 'deficient', 'terrible', ... you're using strong
words instead of concrete arguments, it might intimidate your
opponents, but is hardly helpful in a fair discussion.
More information about the Python-list