Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.linux.misc    |    Linux-specific topics not covered by oth    |    135,536 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 134,192 of 135,536    |
|    The Natural Philosopher to Peter Flass    |
|    Re: naughty Python    |
|    01 Jan 26 21:00:44    |
      XPost: alt.folklore.computers       From: tnp@invalid.invalid              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.              The existing code was shit anyway so I rewrote the lot              --       The lifetime of any political organisation is about three years before       its been subverted by the people it tried to warn you about.              Anon.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca