New competitor to D

Tejas notrealemail at gmail.com
Wed Jul 27 03:51:28 UTC 2022


On Tuesday, 26 July 2022 at 16:34:49 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 26 July 2022 at 16:00:38 UTC, IGotD- wrote:
>> That they mentioned that they want to a have lifetime 
>> annotation like Rust makes me suspicious that they will fail 
>> their goal, which is a simpler C++. Rust is not simpler than 
>> C++ as long you don't trench too far into meta programming and 
>> templates.
>
> Carbon will not have a GC. It will also not have Rust semantics 
> as the checker would be too slow, at least that is what has 
> been said.
>
> Carbon will have more limited generics than C++, so that the 
> "template" can be selected based on the signature constraints 
> without instantiating it. In that sense it is simpler than C++.
>
> I think they actually aim for faster than C++. I assume faster 
> compilation and perhaps more clever optimizations, but I don't 
> know if it is realistic to expect any significant speedups for 
> performance oriented code. Perhaps for naive code?
>
> I would hope that it would be possible to use ARC, but I don't 
> think this will come from Google. I suspect ARC is "too slow" 
> for their use cases?
>
> I would hope that they make the compiler modular so that things 
> like ARC can be "plugged" in by a third party.

I don't think they can afford to provide any automatic memory 
management solutions, since everyone is basically looking for an 
excuse to hate on them

At best, I can imagine them enshrining C++'s `make_shared`, 
`shared/unique_ptr`, etc constructs for better 
optimisations/error reporting/airtight implementations, so that 
nobody can accuse them of introducing performance detrimental 
things like GC(notwithstanding the fact that RC is also a GC 
technique)

I genuinely think this thing might be successful, people disliked 
Go so much, yet look where it is today: the entire foundation of 
the cloud is built on it; Dart had nothing to it's name, now it's 
fighting JavaScript for supremacy as the most cross-platform 
friendly language; I feel Carbon will be a similar success as 
well, if they really get C++ interop, tooling, and job 
opportunities right


More information about the Digitalmars-d mailing list