Phobos 3 Discussion Notes - 02-01-2024

Paul Backus snarwin at gmail.com
Sat Feb 3 12:53:34 UTC 2024


On Saturday, 3 February 2024 at 03:49:54 UTC, Adam Wilson wrote:
> On Friday, 2 February 2024 at 21:11:51 UTC, Andrea Fontana 
> wrote:
>> - Phobos with betterC
>
> This is not in the cards. BetterC would seriously constrain the 
> capability of Phobos as we expect to support 
> TypeInfo/ModuleInfo, threading, Dynamic/Associative arrays, and 
> static module constructors/destructors.

Obviously we are not going to get all of Phobos to work with 
BetterC, but significant chunks of it already do, and there's a 
good deal more that could be considered low-hanging fruit.

I think the right approach here is to try to make code 
BetterC-compatible when we can, and to at least keep BetterC 
compatibility in mind as a "nice-to-have" goal (but not a 
requirement) when doing API design. For example, if the only 
thing keeping a function from being BetterC-compatible is that it 
uses the GC to allocate memory for an error message, it's 
probably worth a little bit of extra effort to either get rid of 
that GC dependency, or provide a `version (D_BetterC)` 
alternative.


More information about the Digitalmars-d mailing list