Fixing C's Biggest Mistake

IGotD- nise at nise.com
Wed Dec 21 21:39:39 UTC 2022


On Wednesday, 21 December 2022 at 19:59:58 UTC, Walter Bright 
wrote:
>
> But to address your point, ImportC has been a big success for 
> D. People trying to interface D with C and C++ have many times 
> lamented the lack of dynamic arrays in C and C++, leading to 
> ugly interface hacks.

You still need interface hacks anyway, for example C flexible 
arrays (last member is an array). C often has a size member field 
determining the size. I think your [..] addition will be used 
very sparsely as most people will import **standard C** APIs.

> The advantages are:
>
> 1. drawing attention to ImportC, which will draw attention to D

I kind of doubt it. Most people will never know about it the [..] 
addition.

> 3. Help get [..] into the C Standard which will help D, too, by 
> making D easier to interface with C

I can get a cat to do my laundry and my taxes before that 
happens. C has been around for 40 years.




More information about the Digitalmars-d mailing list