[TriLUG] Broad question
David Burton via TriLUG
trilug at trilug.org
Mon Sep 4 18:55:16 EDT 2023
I wouldn't have a problem with Python's use of indentation for scoping if
everything were standalone programs. But it is inconvenient when embedding
Python code. I played with PSP (Python Server Pages), via mod_python, which
is basically "the PHP idea" done with Python, and the biggest single
problem with it was the indentation.
Additionally, a perpetual annoyance of mine is the completely arbitrary
syntax differences between the languages which I use. I don't really care
whether I have to type IF/ENDIF or curly braces, nor whether the keyword is
spelled ELSEIF or ELSIF or ELSE IF, but I just wish the languages I use
were consistent. I did a little project
<https://sealevel.info/binomcalc.sphp#:~:text=This%20webpage%20is%20unusually%20designed>
awhile back in which I ended up using a combination of PHP, CGI Perl, and a
little bit of JavaScript (and HTML+CSS), and I continually found myself
using the syntax for the wrong language.
Ah, well. First world problems.
Dave
On Mon, Sep 4, 2023 at 5:20 PM Steve Litt via TriLUG <trilug at trilug.org>
wrote:
> William Sutton via TriLUG said on Mon, 4 Sep 2023 13:29:52 -0400 (EDT)
>
>
> >One more negative about Python: the use of indentation to determine
> >scope. That's just a horrible idea.
>
> 1) With indentation based scope, you never again need to count curly
> braces.
>
> 2) You never again have your indentation depart from what's really
> happening.
>
> 3) No more brace placement feuds. GNU! No, Whitesmith! Oh HELL no, K&R!
> No way, Ratliff! Ratliff's ridiculous, use Pico! Oh never mind,
> we'll just each do it our own way.
>
> 4) With indentation based scope, you know exactly what's going on at a
> glance.
>
> 5) With indentation based scope, the interpreter checks your
> indentation against your code, lessening the chance of you doing
> something you didn't intend to do.
>
> Obviously, the one downside is that everyone in the organization must
> agree on tabs vs spaces and stick to their choice religiously.
>
> SteveT
> --
> This message was sent to: Dave Burton <ncdave4life at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web :
> https://www.trilug.org/mailman/options/trilug/ncdave4life%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome
More information about the TriLUG
mailing list