New to Python - block grouping (spaces)
rustompmody at gmail.com
Mon Apr 20 04:43:49 CEST 2015
On Monday, April 20, 2015 at 7:54:37 AM UTC+5:30, Chris Angelico wrote:
> On Mon, Apr 20, 2015 at 12:08 PM, Rustom Mody wrote:
> > Prestige of Unix development environment keeps us stuck with text files when
> > the world has moved on
> And what, pray, would we gain by using non-text source code? Aside
> from binding ourselves to a set of tools, which would create an even
> worse lock-in?
Threads like this one would become passé.
In html for example there's things like fluid-layout.
So also if indentation was strictly delimited by tabs
then whether you like to see your tabs as 4 spaces and I like to see them as 2
would be as relevant to our discussing shared code as the fact that I wearing
pyjamas and you are in a 3 piece suit.
The key thing to make this work is that the tab needs to be a reasonably solid
non-leaky abstraction for denoting an indent.
As soon as you allow both tabs and spaces all the interminable bikeshedding starts
In many ways this is like the browser wars.
If browsers had been made like half-decent compilers then non-compliant html
wouldn't render and would get corrected on short order.
Instead browsers overreach themselves to be nice (to users) and end up being
horrible to web-developers who now need to maintain 1 dozen browsers × 2 dozen versions.
Likewise all the overreaching to be allow 'free-form' layout puts paid to all
attempts at richer structure comprehending tools.
As a quick example try this:
You've a 10-file python project in which you want to replace function 'f'
by function 'longname'
How easy is it?
I am ready to bet that if you use IE-ish its easy if you use classic editors
This unfortunate choice between sophistication+lockin vs uncivilization+freedom
More information about the Python-list