Feedback on Átila's Vision for D
SrMordred
patric.dexheimer at gmail.com
Fri Oct 25 00:58:00 UTC 2019
On Thursday, 24 October 2019 at 21:29:08 UTC, Walter Bright wrote:
> On 10/24/2019 5:35 AM, Radu wrote:
>> And this comes from a semi failed experiment of mine trying to
>> code a C library in D using -betterC. My conclusions:
>>
>> - You miss the nice dynamic arrays and hash map structures,
>> and others. You end-up rolling your own or wrapping C
>> libraries, which requires lots of effort.
>> - There is no way to generate C/C++ header files from your
>> extern(C/C++) declaration, I know this is being worked on. So
>> had to roll my own.
>> - I had to roll out my own RefCount, Nullable and friends.
>> - At that time copy ctor was not available, so me wanting to
>> properly use immutable for non POD types was a pain.
>> - CTFE is severely limited.
>> Most of these are tracked as bugs already, in case
>> *thatsomeone* asks :)
>
> Since all but the second item are not C features, I don't see
> how these caused your DasBetterC project to fail.
>
>
>> but still has warts like no betterC CTFE.
>
> Specifics, please.
>
> BTW, many of Phobos' modules are template only, meaning they
> should work with betterC.
For me the betterC problems arise more in mixin generate codes.
I believe that every function that interacts with strings fail.(i
think that´s because it uses some autoencoding code that uses gc,
at least looks like that when i tried to search for the problem)
ex:
//this fails with -betterC
import std.string : split;
return "int x; ,".split(",")[0];
More information about the Digitalmars-d
mailing list