The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Phil Budne <phil@ultimate.com>
To: tuhs@tuhs.org
Subject: [TUHS] Re: [TULSA] Re: python
Date: Thu, 03 Aug 2023 12:57:31 -0400	[thread overview]
Message-ID: <202308031657.373GvVvW008640@ultimate.com> (raw)
In-Reply-To: <CAC20D2MvwGmnMJsUa9o9ShAfw0wuakUmkHZ2KyFvjLajNXP48A@mail.gmail.com>

I come not to praise Python...

I picked up Python (v1) in the early 'aughts as a more readable
alternative to Perl and Ruby (non-alphanumerical variable names are a
non-starter for me).

I agree that using indentation alone to determine block structure was
an interesting thought experiment, but TERRIBLE in practice (you might
as well throw away any editing buffer where the phone rang after you
cut and paste, but before re-indenting code), BUT it does prevent (in
a rather fascist way) formatting abominations like the C code in
procmail and SimH.

Python continues to evolve, so it's a moving target, and the argument
that there is ONE RIGHT WAY(TM) to do anything is not only long dead,
but now deeply putrid (much as with the multiple doublings in the size
of C++ and later C++ + STL books).

I used to regard the Python2/Python3 world breakage as a fiasco, but
considering how quickly the language is mutating, perhaps is was a
good fiasco if it lowered the mutation rate for number of years.

On the subject of "no printf", there is not one, not two, but THREE
ways to format strings, easily compounded with print:

	print("%s %s" % ("hello", "world"))
	print("{1} {two}".format("hello", two="world"))
	print(f"{greeting} {populace}")

I'm pretty sure the last method (which initially made me vomit, due to
violating my hardwired ideas about complicating the lexer, as if it
can even be thought of as a separate layer), BUT I Seem To Recall that
it allows a class to implement a formatting method, which may (or may
not) work for complex numbers.

Type "hinting" has been mentioned: again, it's almost like a whole new
version of the language.  You need to pick a type checker, and likely
turn up the knobs to achieve any actual safety, and then deal with the
fact that not all packages supply hints out of the box.  It kind of
offers the desert-topping/floor-wax dichotomy: You can easily/quickly
write small programs with dynamic typing for quick one-offs, AND write
better armored code for libraries & production code.

On tabs vs spaces: Python3 forbids mixing them.  Again, fascist, but
"it's for your own good".

So yes, Python sucks, but I continue using it, and unlike sendmail
(which I continue to run, as I have a 200+ line .mc file it would take
me at LEAST a week to replicate the effects of in another MTA), I
don't tell people Python is unsuitable at any speed.

I'd probably happily write Go or Rust, given a situation (existing
project/program) where its use was inevitable, and I DO have a program
I think is a good candidate for rewriting in Go, but on the whole,
it's a useful tool for many kinds of programmers, and in many
situations, which I think is somewhat remarkable.

  parent reply	other threads:[~2023-08-03 16:57 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-30 18:22 [TUHS] Re: Cool talk on Unix and Sendmail history, by Eric Allman Norman Wilson
2023-07-30 21:43 ` Rob Pike
2023-07-30 23:34   ` George Michaelson
2023-07-30 23:59     ` Erik E. Fair
2023-07-31  0:26       ` Warner Losh
2023-07-31 22:57         ` Grant Taylor via TUHS
2023-07-31 23:05           ` Warner Losh
2023-08-01  2:45             ` Grant Taylor via TUHS
2023-08-01  1:51         ` Niklas Karlsson
2023-08-01  2:47           ` Grant Taylor via TUHS
2023-08-01  3:20           ` Theodore Ts'o
2023-07-31  0:41       ` segaloco via TUHS
2023-08-01  9:22       ` Marc Donner
2023-08-01 10:58         ` Erik E. Fair
2023-08-02  0:37           ` Dave Horsfall
2023-08-02 14:52             ` Ron Natalie
2023-08-02 21:14               ` Grant Taylor via TUHS
2023-08-02 22:20                 ` segaloco via TUHS
2023-08-02 22:37                   ` Warner Losh
2023-08-02 23:49                   ` Rich Salz
2023-08-03  0:51                     ` [TUHS] Re: python Larry McVoy
2023-08-03  1:20                       ` George Michaelson
2023-08-03  2:53                         ` Bakul Shah
2023-08-03  2:55                         ` segaloco via TUHS
2023-08-03  3:24                         ` George Michaelson
2023-08-03  3:32                           ` Warner Losh
2023-08-03  3:55                           ` Bakul Shah
2023-08-03  8:32                             ` Rob Pike
2023-08-03 14:19                               ` Bakul Shah
2023-08-03 14:56                                 ` Dan Halbert
2023-08-03 15:20                                   ` will.senn
2023-08-03 22:05                                     ` Dan Cross
2023-08-04  0:24                                       ` John Cowan
2023-08-04 15:17                                         ` Dan Cross
2023-08-05  4:44                                       ` Bakul Shah
2023-08-03 15:41                                 ` John Cowan
2023-08-03  2:07                       ` Clem Cole
2023-08-03  2:21                         ` Pete Wright via TUHS
2023-08-03  2:56                           ` Warner Losh
2023-08-03 12:36                         ` Mike Markowski
2023-08-03 13:29                           ` Rob Pike
2023-08-03 15:24                             ` emanuel stiebler
2023-08-03 15:39                               ` Steffen Nurpmeso
2023-08-04  1:01                             ` Larry McVoy
2023-08-04  1:28                               ` segaloco via TUHS
2023-08-04  1:58                                 ` Adam Thornton
2023-08-04 15:04                                   ` Dan Cross
2023-08-04 15:10                                     ` Larry McVoy
2023-08-03 16:57                         ` Phil Budne [this message]
2023-08-03 17:00                           ` [TUHS] Re: [TULSA] " Rich Salz
2023-08-03 20:35                             ` [TUHS] Split addressing (I/D) space (inspired by the death of the python... thread) Will Senn
2023-08-03 21:05                               ` [TUHS] " Kenneth Goodwin
2023-08-03 21:10                                 ` Ronald Natalie
2023-08-03 21:16                                   ` Warner Losh
2023-08-03 21:24                                     ` Ronald Natalie
2023-08-03 22:34                                   ` Kenneth Goodwin
2023-08-03 21:05                               ` Ronald Natalie
2023-08-03 21:44                               ` Clem Cole
2023-08-03 22:08                                 ` Will Senn
2023-08-03 22:54                                   ` Clem Cole
2023-08-03 23:08                                     ` Dave Horsfall
2023-08-03 23:15                                     ` Clem Cole
2023-08-04  0:38                                     ` John Cowan
2023-08-03 17:29                           ` [TUHS] Re: [TULSA] Re: python Alejandro Colomar
2023-08-03 17:51                             ` John Cowan
2023-08-03 18:05                               ` Alejandro Colomar
2023-08-03 21:29                                 ` Dan Cross
2023-08-03 23:55                                   ` [TUHS] printf (was: python) Alejandro Colomar
2023-08-04 16:06                                     ` [TUHS] " Dan Cross
2023-08-04 16:57                                       ` Alejandro Colomar
2023-08-04 21:16                                         ` Dan Cross
2023-08-03 21:02                           ` [TUHS] Re: [TULSA] Re: python Steffen Nurpmeso
2023-08-03 23:47                           ` Larry McVoy
2023-08-03 23:54                             ` Will Senn
2023-08-04 19:20                         ` [TUHS] " Ed Bradford
2023-08-04 19:47                           ` Larry McVoy
2023-08-05  5:40                             ` Ed Bradford
2023-08-02 23:33               ` [TUHS] Re: Cool talk on Unix and Sendmail history, by Eric Allman Dave Horsfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308031657.373GvVvW008640@ultimate.com \
    --to=phil@ultimate.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).