Why do some attributes start with '@' while others done't?

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 22 11:10:38 PST 2016

On Fri, Jan 22, 2016 at 06:39:39PM +0000, Ola Fosheim Grøstad via Digitalmars-d wrote:
> On Friday, 22 January 2016 at 18:28:31 UTC, Wyatt wrote:
> >If you need an IDE to work comfortably in a language, something has
> >clearly gone wrong.
> In the case of Python what was wrong is that it accepts both tabs and
> spaces for indentation. It should have required either tabs or spaces.
> So you basically need a good editor to makes sure that you don't have
> to deal with that problem.

I work with Python code without an IDE, and I manage just fine. As long
as you're consistent with how you use tabs vs. spaces, it's not a
problem. (Besides, even when it *is* a problem it's not a *big* problem
at all -- the interpreter simply bails out and you just edit the
offending line and move on. End of story.)

> As far as legibility it is the same for me. It took a lot of time for
> me to get used to "{" instead of "BEGIN". It took a similar amount of
> time to get used to Python's indentation. So I'd blame that on
> conditioning (what we are used to).

While I wouldn't adopt significant whitespace the way Python does if I
were to design a language, I don't find Python's indentation
requirements that strange at all. After all, if you're using good coding
practices you should *already* be using consistent indentation anyway,
so you should already be ready to work with Python with minimal changes
to your habits.  People who complain about Python's "whitespace thing"
tend to be people who write unreadable code in the first place; that's
no surprise.


Change is inevitable, except from a vending machine.

More information about the Digitalmars-d mailing list