home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.electronics.design      Electronic circuit design      143,326 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 143,039 of 143,326   
   albert@spenarnc.xs4all.nl to '''newspam'''@nonad.co.uk   
   Re: Call by reference protection   
   23 Feb 26 12:44:02   
   
   In article <10n9deu$a7ej$1@dont-email.me>,   
   Martin Brown  <'''newspam'''@nonad.co.uk> wrote:   
   >On 19/02/2026 22:04, Don Y wrote:   
   >> [Obdisclaimer:  cc'ing s.e.d only because some of you are no longer   
   >> subscribed to the list and will likely not see this, otherwise.   
   >> And, its a substantial change in the API so worth noting.]   
   >>   
   >> Using similar mechanisms to those that I use in call-by-value RMIs,   
   >> I can protect against races for call-by-reference -- throwing an   
   >> exception or just spinning on any violations on the calling side.   
   >>   
   >> Or, I can just let people rely on their own discipline to   
   >> ensure they don't introduce latent bugs via this mechanism   
   >> (resorting to call by value universally seems a bad idea   
   >> for legacy coders).  As these types of races have typically   
   >> been hard to test for, I suspect it is worth the effort.   
   >>   
   >> Any pointers to languages or IDLs that include such qualifying   
   >> adjectives?   
   >   
   >Languages that allow call by reference to be qualified with a const or   
   >readonly directive so that the routine reading the original object (no   
   >copy made) is not allowed to alter the it in any way.   
   >   
   >Detectable as a compile time fault if you do. Relying on all coders to   
   >be disciplined is likely to be ahem... disappointing.   
   >   
   >I can't be the only one to have seen shops where the journeymen are so   
   >unskilled that getting C code to compile by the random application of   
   >casts is the norm. Not written in C but the UK scandalous Horizon PO   
   >accounting system was written by people of that calibre (thickness).   
      
   Using casts should be forbidden in the code standard.   
   If you want them, you should get approval from a senior programmer.   
   He will probably learn you that the cast wasn't necessary.   
      
   >   
   >They compounded the problem by having expert witnesses perjure   
   >themselves to convict entirely innocent postmasters of fraud because the   
   >computer was "infallible". The resulting mess is still ongoing.   
   >   
   >--   
   >Martin Brown   
   >   
   --   
   The Chinese government is satisfied with its military superiority over USA.   
   The next 5 year plan has as primary goal to advance life expectancy   
   over 80 years, like Western Europe.   
      
   --- 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