Current state of "D as a better C" (Windows)?

anonymous anonymous at example.com
Sun Jan 26 03:00:02 PST 2014


On Sunday, 26 January 2014 at 02:03:29 UTC, Frank Bauer wrote:
> C has the *semantics* of new / delete with malloc and free. D 
> has too, if you constrain yourself to memory allocation via 
> std.c.stdlib.malloc and free, which means no object allocation 
> with *new* anymore. We don't want to constrain ourselves to 
> that, do we? What we want is malloc/free *semantics* throughout 
> if we choose so.
[...]
> I'm aware that I can use a D subset that is roughly equivalent 
> to C and C's standard library. This subset is precisely what I 
> am *not* talking about. I am talking about all the great modern 
> architectural features of D and Phobos.
>
>> Your points don't apply to D vs C.
>
> It does if I want to use D in its entirety not just its subset 
> equivalent to C.
>
> So if I want C++ new/delete or Rust's owned pointer semantics I 
> should constrain myself to D's subset that is equivalent to C 
> and forget about Phobos altogether? Welcome to the *new* D.

Welcome to "D as a better C", not "D as a better 'better C' than
C++ and Rust". You might shed a tear for all the goodness you're
missing out on, but there's still templates, slicing, methods,
etc left.


More information about the Digitalmars-d mailing list