Fixing C's Biggest Mistake
Walter Bright
newshound2 at digitalmars.com
Wed Dec 21 19:31:22 UTC 2022
On 12/21/2022 11:22 AM, matheus wrote:
> On Wednesday, 21 December 2022 at 19:09:37 UTC, Walter Bright wrote:
>> https://news.ycombinator.com/edit?id=34084894
>>
>> I'm wondering. Should I just go ahead and implement [..] in ImportC?
>
> Could you please post what's going on for those who can't access the link?
I posted this on Hacker News in response to an article about Microsoft's Checked C.
=======================
Checked C:
int a[5] = { 0, 1, 2, 3, 4};
_Array_ptr<int> p : count(5) = a; // p points to 5 elements.
My proposal for C:
int a[5] = { 0, 1, 2, 3, 4};
int p[..] = a; // p points to 5 elements.
https://www.digitalmars.com/articles/C-biggest-mistake.html
https://github.com/Microsoft/checkedc/wiki/New-pointer-and-a...
More information about the Digitalmars-d
mailing list