New to Python - block grouping (spaces)

BartC bc at freeuk.com
Sun Apr 19 13:38:43 CEST 2015


On 18/04/2015 03:22, Ben Finney wrote:
> BartC <bc at freeuk.com> writes:
>
>> (Actually *I* would quite like to know why languages don't have
>> switchable syntax anyway to allow for people's personal preferences.)
>
> Which people's personal preferences? Are these the same people who have
> such passionate disagreement about tabs versus spaces?
>
> If you only write programs that will only ever be read by you and no-one
> else, feel free to maintain a fork of Python (or any other language)
> that suits your personal preferences.
>
> Too much effort? Or maybe you sometimes want others, whose preferences
> may not exactly match yours, to collaborate on programs you write? Then
> I think you have your answer of why such personal perferences are not
> switchable in the languages we actually use.

Perhaps you don't understand what I'm getting at.

Suppose there were just two syntaxes: C-like and Python-like (we'll put 
aside for a minute the question of what format is used to store Python 
source code).

Why shouldn't A configure his editor to display a Python program in 
C-like syntax, and B configure their editor to use Python-like tabbed 
syntax?

A can write code in the preferred syntax, and B can view/modify exactly 
the same code in /their/ preferred syntax. What would be the problem? 
(The actual stored representation of the program would be in one of 
those two styles, or something else entirely; Lisp-like syntax for 
example. It doesn't matter because no-one would care.

(I think much of the problem that most languages are intimately 
associated with their specific syntax, so that people can't see past it 
to what the code is actually saying. a=b, a:=b, b=>a, (setf a b), 
whatever the syntax is, who cares? We just want to do an assignment!)

-- 
Bartc










More information about the Python-list mailing list