Is it time for D 3.0?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Mar 30 20:46:51 UTC 2020


On Monday, March 30, 2020 11:30:45 AM MDT H. S. Teoh via Digitalmars-d 
wrote:
> On Mon, Mar 30, 2020 at 07:09:30PM +0200, Jacob Carlborg via Digitalmars-d 
wrote:
> > On 2020-03-30 07:51, Denis Feklushkin wrote:
> > > Perhaps this from those ancient times when compatibility D with C
> > > was declared at source level? (Or am I confusing and there was no
> > > such period?)
> >
> > Yes, kind of. It was said if you copy-paste C code to a D file and it
> > compiles, it should have the same behavior as in C.
>
> [...]
>
> Isn't that still true?  Keyword here being, "if it compiles".

Mostly. IIRC, there are a few cases where it's not (e.g. a function
parameter which is a static array in D will effectively compile as a dynamic
one in C, because C only ever passes arrays as pointers), but in almost all
cases, C code is either valid D code with the same semantics, or it doesn't
compile.

- Jonathan M Davis





More information about the Digitalmars-d mailing list