home bbs files messages ]

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

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

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

   Message 263,743 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Dan Cross   
   Re: VMS Bootcamp   
   12 Nov 25 17:14:49   
   
   From: arne@vajhoej.dk   
      
   On 11/12/2025 8:04 AM, Dan Cross wrote:   
   > In article <10eok5t$2u3pu$1@dont-email.me>,   
   > Arne Vajhøj   wrote:   
   >> Rewriting the business application from one   
   >> memory safe language (Java, C#, Python, Pascal   
   >   
   > Given the `POINTER` type, consequent support for type-casting   
   > pointers, and dynamic memory allocation, it's hard to understand   
   > how VSI Pascal can be considered meaningfully memory safe in the   
   > way that Rust or a managed language is.   
      
   The US government considers Pascal a memory safe language.   
      
   :-)   
      
   But I think you are right about it being a bit questionable.   
      
   I consider the 3 biggest memory unsafe problems to be:   
   * no out of bounds check for array index   
   * allowing use of deallocated memory   
   * memory leak due to memory never being deallocated   
      
   Pascal only prevents the first not the other two.   
      
   The other two are not as common in Pascal as in C,   
   because dynamic memory allocation is not as common in   
   Pascal as in C.   
      
   I did a quick check in my code repo and I use dynamic   
   memory allocation in 25% of my C pieces but only in   
   0.5% of my Pascal pieces. I am just one out of   
   millions so it is obviously anecdotal only, but pretty   
   big difference ...   
      
   Anyway 1 fixed + 2 not fixed but rare is not really   
   fixed.   
      
   So I think you are right and the US government is wrong.   
      
   :-)   
      
   I do not see a problem with the pointer type casts. If   
   normal code is safe, then I think it is OK to have ways   
   to workaround the safeness. Sometimes it is desirable   
   and it is hopefully easy to identify usage of such   
   constructs and require extra code review of such code.   
      
   Arne   
      
   --- 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