Specifying C++ symbols in C++ namespaces

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sun Apr 6 02:53:45 PDT 2014


> I think it's very low hanging fruit to add support for basic 
> C++ namespaces. Support for basically just set the mangled name 
> in a somewhat nice way, a pragma for example.

I think it is more important to think in term of strategic 
positions than whether it takes 1 or 2 weeks to implement a 
feature.

Assumption:
It is desirable to make the eco system more attractive for 
commercial projects.

Key requirements:
- Long term stability of the dev environment.
- Access to mature libraries with significant backing (basically 
C/C++ libraries).
- Easy integration with existing technology and systems 
(basically C/C++).
- No lock-in (basically C/C++ interop).
- Predictable dev environment that enables precise cost estimates.
- Lowering costs/faster development than the alternatives (more 
convinient than C/C++)

If you cannot assume that you can utilize a C++ library from D or 
if you have to assume that using a C++ library might incur a 
significant interfacing overhead (in terms of programmer's time) 
then D looks like a more risky proposition.

The key difference between a commercial project and a hobby 
project is that the hobby project can fully adapt the 
requirements to the dev environment. A hobbyist game project can 
settle for a less capable physics engine or create a custom one, 
for fun. A commercial project will view that as costs that cut 
into profit margins and  a potential source of failure in the 
market. That's a good reason to go with C++ instead of D.

 From a strategic point of view it is important to fully support 
those features you claim to support.

If you can claim that interfacing with C++, except for templates, 
is easy, then you communicate that it is relatively easy to 
assess project costs. If you only claim that it is possible to 
interface with some of C++, but that it is kind of difficult 
under certain  vaguely specified circumstances then I think you 
should wait until you have a better solution.

What you absolutely don't want is to trick people into thinking 
that interfacing with C++ is easy, if it isn't, and have them 
discover that they are better off dumping D and doing it all over 
in C++.


More information about the Digitalmars-d mailing list