A gentle critque..

Walter Bright newshound at digitalmars.com
Mon May 15 12:42:05 PDT 2006


Ben Cooley wrote:
> I'm rooting around for a more practical language that can be integrated into a
> very large mixed C/C++ codebase.  D just can't do what I need it to do, and it's
> really too bad because I have followed D and really actually do like it.
> 
> The code base we work with has several problems, one being the inclusion of more
> than 20 external C and C plus plus third party libraries, as well as utilization
> of the linux and windows api's.  And more importantly occasional instability due
> to the use of C unsafe programming practices.
> 
> I'm posting this because I suspect that the quiet majority of C plus plus
> programmers out there agree with me.  We simply aren't interested in
> participating in a crusade to make D popular.  We just want something that can
> do what we really need, and there are an awful lot of C and C plus plus projects
> out there that depend on being able to parse C and C plus plus headers and
> likely always will be.
> 
> I'm not trying to offend anyone, and I really don't expect anyone to agree
> necessarily.  Just want to put forward my opinion as to what made a language
> like C plus plus with its radical new programming paradigm popular.. and how D
> deviates from this path.

I understand where you're coming from. I agree that if D could parse C 
and C++ header files out of the box, that would increase the rate of D's 
acceptance.

The trouble is that if we were to do it, then we'd have to give up what 
D is and what makes D so cool. C++ has reached the end of the road in 
what can be done while maintaining C compatibility and compatibility 
with older C++ code.

That said, D can be (and is) compatible with the C abi, which is a lot 
more than can be said for other languages like Java, C#, etc. You *can* 
link to C object files. You *can* access C objects and C functions 
directly. You *can* access C++ objects directly if they adhere to the 
COM interface. You *can* hook up with any C++ code that exposes an 
extern "C" interface.



More information about the Digitalmars-d mailing list