home bbs files messages ]

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,173 of 135,536   
   The Natural Philosopher to All   
   Re: naughty Python   
   01 Jan 26 12:49:19   
   
   XPost: alt.folklore.computers   
   From: tnp@invalid.invalid   
      
   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.   
      
   C's ability to say if this byte is such and such then what follows may   
   be considered to be a structure, or else 17 integers, or else a text   
   string....the point being that the people who constructed the software   
   that wrote to the (ram) disk didn't write in Pascal. They wrote in   
   Assembler. They had AFAICT ripped off CP/M.   
   I threw the pascal out and rewrote everything in a French  B & B over   
   the weekend.  In C. Probably the best work I ever did.   
      
   For which the guy who I did it for didn't pay me till I took him to court.   
      
   Whereas the best money I ever made was to go to London and get paid £450   
   to snip the leg on one capacitor...   
      
      
   --   
   “It is dangerous to be right in matters on which the established   
   authorities are wrong.”   
      
   ― Voltaire, The Age of Louis XIV   
      
   --- 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