From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26186 invoked from network); 3 Aug 2023 16:57:46 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2023 16:57:46 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id BD15E415D4; Fri, 4 Aug 2023 02:57:41 +1000 (AEST) Received: from mail.ultimate.com (mail.ultimate.com [IPv6:2607:fc50:0:15::100]) by minnie.tuhs.org (Postfix) with ESMTPS id B18F9415D3 for ; Fri, 4 Aug 2023 02:57:36 +1000 (AEST) Received: from ultimate.com (localhost [127.0.0.1]) by mail.ultimate.com (8.17.1/8.17.1) with ESMTPS id 373GvVO8008641 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Aug 2023 12:57:31 -0400 (EDT) (envelope-from phil@ultimate.com) Received: (from phil@localhost) by ultimate.com (8.17.1/8.17.1/Submit) id 373GvVvW008640; Thu, 3 Aug 2023 12:57:31 -0400 (EDT) (envelope-from phil) From: Phil Budne Message-Id: <202308031657.373GvVvW008640@ultimate.com> Date: Thu, 03 Aug 2023 12:57:31 -0400 To: tuhs@tuhs.org References: <8246.1690761540@cesium.clock.org> <29602.1690887524@cesium.clock.org> <20230803005106.GA12652@mcvoy.com> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID-Hash: FSQQCO3GXWV5TGT767IMSBO54ZHAYHUE X-Message-ID-Hash: FSQQCO3GXWV5TGT767IMSBO54ZHAYHUE X-MailFrom: phil@ultimate.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: [TULSA] Re: python List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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.