D mentioned on Rust discussions site

Paulo Pinto pjmlp at progtools.org
Sat May 23 15:22:52 UTC 2020


On Saturday, 23 May 2020 at 13:18:38 UTC, Dibyendu Majumdar wrote:
> ...
>>
>> C missed some obviously great ideas. One is nested functions, 
>> which fit right in with C's semantics. The other is the fix 
>> for:
>>
>> https://www.digitalmars.com/articles/C-biggest-mistake.html
>
> I do not think it was a mistake at all. Treating pointers and 
> arrays uniformly is one of the great innovations in C.

Yeah, because it is so hard to type:

int *ptr = &my_array[0] // instead of int *ptr = my_array;


I guess the benefit is that C developers don't get RSI for their 
pointer and arrays handling code.

>
> https://www.lysator.liu.se/c/bwk-on-pascal.html

Most of those issues were sorted out by the mid-80's, also PL/I 
dialects, BLISS, Ada and Modula-2 don't suffer from them.

Ironically, NEWP, a systems programming language 10 years older 
than C, still exists and Unisys uses its security features as 
means to sell ClearPath MCP against UNIX based OSes for goverment 
level security.

Whereas those that still use C get what they deserve,

https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/

"Expert Q&A: C#/C++/Rust WinRT Team"

https://mybuild.microsoft.com/sessions/f22a612d-0030-4e55-b389-2da0f99b8839

"Microsoft's Safe Systems Programming Languages Effort"

https://mybuild.microsoft.com/sessions/61de34c5-b111-4ece-928f-541854875862

And guess what Google is doing starting with Android 11,

> Platform hardening - We’ve expanded use of compiler-based 
> sanitizers in security-critical components, including BoundSan, 
> IntSan, CFI, and Shadow-Call Stack. We’re also enabling heap 
> pointer tagging for apps targeting Android 11 or higher, to 
> help apps catch memory issues in production. These hardening 
> improvements may surface more repeatable/reproducible app 
> crashes in your code, so please test your apps. We've used 
> HWAsan to find and fix many memory errors in the system, and we 
> now offer HWAsan-enabled system images to help you find such 
> issues in your apps.

https://android-developers.googleblog.com/2020/02/Android-11-developer-preview.HTML

Which is just catchin up with what iOS, Solaris SPARC and Azure 
Sphere are already doing.

So is the trust on C developer's capabilites to actually write 
memory corruption free code.


More information about the Digitalmars-d mailing list