XPost: alt.folklore.computers   
   From: bowman@montana.com   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|