Hi Andrew,
On 4/12/19 5:15 pm, Andrew Barnert wrote:
On Dec 3, 2019, at 14:34, Jan Bakuwel <[email protected]> wrote:
People focus on the silly example and suggest that the code needs refactoring
but that is besides the point.
You’re the one who gave that example as motivation, and who specifically
highlighted the “more than a page of code” thing; it’s not something everyone
else invented and read into your example.
Fair enough. See below for a link to a few examples in the Ada
programming language.
If that example is a bad argument for your proposal, the burden of coming up
with a good argument for your proposal is on you. (After all, the default for
any proposal is to not change anything.) If there are “plenty use cases”,
provide one that isn’t silly instead of one that is.
Yeah, ok. I have a feeling though that even if I would provide a
real-life use case that people would argue that they can read it fine
without the end statements or that I should refactor the code so all
blocks would easily fit on a page or that the code should not be nested
deeper than X levels.
It's clear that I failed to convince even a single person so it's time
to drop it. Great to have this list to test the waters so to speak :-)
While you’re at it, you might want to show some other languages. I think part
of the reaction against it comes from the languages people are familiar with.
Python, Swift, Ruby, and most other languages people tout as “readable” just
have a generic end or } or dedent or whatever for all blocks. So does C and all
of descendants. But PHP has endfor, and pl/SQL, and sh has for/do/done… and
those aren’t languages people want to use. Maybe that’s an unfair prejudice—but
if so, if you can point people to better examples, it might help overcome that.
As mentioned, my suggestion comes from my experience with the Ada
programming language.
Ada even has "named loops", a really cool feature that allows you to
exit an outer loop inside an inner loop by "exiting" the loop referring
to it's name
(https://en.wikibooks.org/wiki/Ada_Programming/Control#Loop_with_condition_at_the_beginning).
In my opinion, Ada is one of the most well designed programming
languages aiming at reducing anomalies and thus more reliable systems.
From the article on Wikipedia "For these reasons, Ada is widely used in
critical systems, where any anomaly
<https://en.wikipedia.org/wiki/Anomaly_in_software> might lead to very
serious consequences, e.g., accidental death, injury or severe financial
loss. Examples of systems where Ada is used include avionics
<https://en.wikipedia.org/wiki/Avionics>, air traffic control
<https://en.wikipedia.org/wiki/Air_traffic_control>, railways, banking,
military and space technology."
https://en.wikipedia.org/wiki/Ada_%28programming_language%29
Thanks all, for your time and engagement, it's much appreciated.
regards,
Jan
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/THHUALRDWIDGEPPJID7QA43WH4E7USFL/
Code of Conduct: http://python.org/psf/codeofconduct/