[Info-vax] Userland programming languages on VMS.

Arne Vajhøj arne at vajhoej.dk
Sun Jan 30 18:47:46 EST 2022


On 1/30/2022 5:25 PM, VAXman- at SendSpamHere.ORG wrote:
> In article <61f6dbb2$0$692$14726298 at news.sunsite.dk>, =?UTF-8?Q?Arne_Vajh=c3=b8j?= <arne at vajhoej.dk> writes:
>> On 1/30/2022 1:26 PM, VAXman- at SendSpamHere.ORG wrote:
>>> BS.  If/when memory is allocated it needs to be deallocated when it is no
>>> longer needed.  Same goes for pushing things on the stack -- push data on
>>> and pop data off.  Assembly language programmers are generally just better
>>> at those sorts of things because the results of mucking up are not pretty.
>>
>> ....
>> push
>> ....
>> pop
>> ....
>>
>> is manageable.
>>
>> So is:
>>
>> ....
>> allocate
>> ....
>> deallocate
>> ....
>> return
>>
>> The problem arise with the more complex flows where the allocating
>> routine pass the pointer on to something and return expecting some
>> other code to deallocate.
> 
> That's just poor coding or poor design if there's a memory leak.

A memory leak is a bug and somebody made a mistake if a bug
is introduced.

But that doesn't really change anything.

It is an observable fact that mistakes are made and bugs introduced
all the time and memory leaks are a common type of bug with languages
that require manual deallocation.

In the real world there are just two choices:
- say that developers should avoid errors and watch errors
   continue to be made
- design programming languages, tools and processes
   so that the provider fewer opportunities for errors

Arne


More information about the Info-vax mailing list