Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc,alt.folklore.computers Subject: Re: naughty Python Date: 2 Jan 2026 06:03:59 GMT Lines: 85 Message-ID: References: <79ScnZHy-uXnP8n0nZ2dnZfqnPadnZ2d@giganews.com> <4oycne7Wk4RQ6sj0nZ2dnZfqnPidnZ2d@giganews.com> <10j48fv$2t1h9$12@dont-email.me> <10j5qgf$3etcd$6@dont-email.me> <10j60bb$3hhps$1@dont-email.me> <10j6n9s$3q8au$2@dont-email.me> <10j71fr$3rnk5$1@paganini.bofh.team> <10j7d6m$1t1v$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net sl39xbimjxuIU2+OgAPBkw/ioMKP21KNeRQSygBrGCggzCRnAJ Cancel-Lock: sha1:MtP08HCdyV3ueZXpaHWylCnQKPU= sha256:J7DyXKqza7/+BCBXU3E8wKP8/qOWCgOIzpqUyQqPnas= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:80274 alt.folklore.computers:233014 On Thu, 1 Jan 2026 20:14:30 -0700, Peter Flass wrote: > On 1/1/26 16:54, Waldek Hebisch wrote: >> In alt.folklore.computers The Natural Philosopher >> wrote: >>> On 01/01/2026 14:28, Peter Flass wrote: >>>> On 1/1/26 05:49, The Natural Philosopher wrote: >>>>> On 01/01/2026 03:07, c186282 wrote: >>>>>> On 12/31/25 17:35, The Natural Philosopher wrote: >>>>>>> On 31/12/2025 19:21, c186282 wrote: >>>>>>>> I've writ stuff with five or six levels of nesting >>>>>>>>    but don't like it, usually if/then/else stuff. Oft re-did >>>>>>>>    it later to be more easy to follow. IMHO >>>>>>>>    readability/comprehensibility is as important as >>>>>>>>    functionally correct code. >>>>>>> >>>>>>> 100% agree. >>>>>>> >>>>>>> Often write little functions that are only called once. Merely to >>>>>>> lexically separate atomic functional blocks. >>>>>>> >>>>>>> No idea whether the compiler/linker inlines them or not. >>>>>>> >>>>>>> There is nothing worse than making top level decisions followed by >>>>>>> some nitty detail to detect some low level error. >>>>>>> >>>>>>> e.g. assume a call to allocate memory always works or the call >>>>>>> will do the appropriate jump to a global error handler to abort >>>>>>> things cleanly. >>>>>>> >>>>>>> The point of structure was supposed to be to elucidate program >>>>>>> flow, >>>>>>> not obscure it with elegant formally correct cruft. >>>>>> >>>>>> >>>>>>    Agree. >>>>>> >>>>>>    As I've said before, I'm still quite fond of Pascal and write >>>>>>    apps of various size in it (oft first proto-ed in Python). >>>>>>    The structure is 'elegant', but you CAN carry it TOO far, to >>>>>>    where it gets in the way instead of helping things. >>>>>> >>>>> My one and only  experience of trying to make Pascal do what was >>>>> trivial in 'C' led me to resolve never ever to touch it again. >>>>> >>>>> If you are trying to write - as it turned out I was - a disk driver >>>>> in pascal, where a given sector may be a byte stream, a series of 16 >>>>> bit integers,  or a structure defined by thee first few bytes in the >>>>> sector, you end up with a massive union that is so cumbersome it is >>>>> almost impossible to read - let alone use. >>>> >>>> Doesn't Pascal have variant records? >>>> >>> IIRC it (Turbo Pascal. The amateurs language) had unions of some sort, >>> but I would have needed about 100 to cover all cases and it was even >>> then messy. >> >> Turbo Pascal could do essentially all thar C could do (and do things >> which were not strightforward in C, but this is irrelevant here). And >> do this in a very similar way, once you knew how Turbo Pascal >> constructs worked. If you really needed 100 variant record in Turbo >> Pascal, >> then you needed 100 unions in C. If you could do this more simply in >> C, you could do this more simply in Turbo Pascal too. >> Given what you wrote, it looks that you simply lacked experience >> writing Turbo Pascal. In other words, you were unqualified to do the >> job that you were supposed to do (write the driver in Turbo Pascal), so >> you decided to do thing that you know how to do, that is to write it in >> C. >> >> IMO biggest drawback of Turbo Pascal was poor speed of generated code >> (and size too). For me deal breaker was fact that Turbo Pascal was >> 16-bit and tied to DOS. DJGCC gave me 32-bit integers and slightly >> later I switched to Linux, so Turbo Pascal was not longer relevant for >> me. But if you were programming 16-bit DOS and did not mind poor speed >> of generated code, than IMO Turbo Pascal was quite decent programming >> language, quite competitive in expressivity to C. > > Now there's Free Pascal. I'm not a Pascal programmer, but I admit I was > impressed when I looked at what's in the package. https://www.lazarus-ide.org/ I put that on the Fedora box. It looks nice but life is too short. New Year's Resolution #1: don't get distracted by passing squirrels.