[Info-vax] Rust as a HS language, was: Re: Quiet?

chris chris-nospam at tridac.net
Thu Apr 7 10:26:54 EDT 2022


On 04/07/22 02:00, Arne Vajhøj wrote:
> On 4/6/2022 7:46 PM, chris wrote:
>> On 04/06/22 00:46, Arne Vajhøj wrote:
>>> C and C++ are currently dominating the low level code area, but
>>> there are some well known problem.
>>>
>>> Two of those problems are:
>>> * buffer overruns
>>> * memory leaks
>>
>> Neither of those are the fault of the core language, but C library,
>> separate from the language. Man write their own library
>> functions to avoid that sort of issue.
>
> That is not correct.
>
> Arne

What part of that is incorrect ?.

 > Those problems cannot be solved by library changes.
 >
 > Unchecked array access does not include any library
 > functions.

Well, pointers are dangerous in careless hands, but
you don't try to make them less so by constraining their
use. Seems to me, all efforts in that direction end up
limiting choices and tend to funnel design direction
into narrow, inflexible  pathways. Some like that and
may even think they need it, but not here.

As I hinted, it depends how much a language should hold
your hand to try and prevent errors. Prefer the freedom
to make my own choices and the maximum freedom to make
them, within the law, of course. For a programming
language, that law means the specification.

 >
 > And both GC and the more exotic ownership concept
 > requires more than library changes - it requires language
 > and runtime environment (which is not the same as
 > runtime library) changes.
 >

Assume we were talking about C here, which has no GC in
the design. C++ perhaps, but that's a whole other can of
worms....

Chris






More information about the Info-vax mailing list