POV-Ray : Newsgroups : povray.off-topic : All bow to the mighty Python : Re: All bow to the mighty Python Server Time
4 Sep 2024 19:23:32 EDT (-0400)
  Re: All bow to the mighty Python  
From: Darren New
Date: 21 Apr 2010 12:36:52
Message: <4bcf29a4$1@news.povray.org>
Warp wrote:
>> I guess not. I figured you meant "indenting as you type" or something.
>   That's only *part* of it. Autoindentation works on existing lines too.

If existing lines are indented incorrectly, then your code is broken. The 
reason that "auto indenting" is not possible in Python is the same reason 
that "auto bracing" isn't possible in C.

>> What you're saying is "Python using whitespace is stupid because a lot of 
>> web sites don't treat whitespace as significant."  Sure, OK, that's an opinion.
> 
>   I think it's a very valid opinion taking into account the amount of
> programming forums and blogs out there.

Sure. It's just a question of whether you're fixing the wrong problem. It's 
like saying everyone should learn English because most blogs only handle 
ASCII.  People fixed most of the web apps to not corrupt < and >.  People 
who post Python code should do it via web apps that don't corrupt leading 
whitespace in python apps.

Now, I'll grant that the best thing would be to have indent and dedent 
characters or sequences (like trigraphs in C perhaps).  Cutting text from a 
Python file should insert said trigraphs, and text editors that understand 
python could turn them back into appropriate indentation. (Using the generic 
"you":) But reducing *my* productivity during coding simply because *you* 
are too lazy to not corrupt my source code is not a good thing.

-- 
Darren New, San Diego CA, USA (PST)
   Linux: Now bringing the quality and usability of
   open source desktop apps to your personal electronics.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.