A gentle critque..

dennis luehring dl.soluz at gmx.net
Tue May 16 23:09:48 PDT 2006


> D uses __VectorInt, which was the point of providing the cpptype {} keyword in
> the first place.  The code within the braces is not parsed by D, but placed in
> an external cpp file which is compiled by a Cpp compiler into a standard Cpp
> class that D CAN use.

due to the missing standart abi in c++ (there is no official and STABLE 
convention) - what is a "standart" cpp class that D CAN use? and even if
we can make one cpp class a "standart" how do we link to your current 
object code... (does there the magic thing happen)

if I don't get the point - can someone send me the c++ abi for some vc++ 
versions (5-2005) and borland/bcb c++ (3-2006)...

because im involved in an projects which uses vc5, vc2005 and bcb4
it would be nice to link them together without preparing them (using 
dlls, COM interface,...)

> Likewise, a complex functional macro can be placed in the Cpp file and wrapped
> with a standard c function:

how to detect functional macros?, what means complex to you?
can you help me convert this macro into an function

#define DEFINT(varname,value)\
##varname int = value;\

> I don't know.. is this a joke?  Let me ask you, do you find yourself personally
> offended by these ideas?

not offended but amused about your ideas (your first posts sounded like 
21years of c/c++, your last posts becoming more and more 2.1 years of 
c/c++ or vb style...)

> Compared to what?  A multi-year project to convert the C Windows API to D so
> that Windows software can finally be written?

compared to what - a multi-year c++-to-D interface wrapper/compiler 
which wont ever become stable (because there is no stable abi)

in the pure source code world c++ is nice and nearly vendor unspezific
but c++ object code comes out of the hell...

btw: the winapi project is just a (yes manualy made) conversion of the 
headers - because D can directly link c object code

but yours is header conversion AND the linkage problem - the winapi port 
will be finished long, long time before

> I would suggest if you don't like it, then don't feel that you have to use it.

the problem is i would give it a try, but i don't think it would ever 
happen to exist...

> 21 years.  I've actually used to own a copy of Zortech.  
ok then your familar with assembler (me too)

can you please write a small class (template), compile your code with 
vc,gcc,bcb,bc (at least 2-3 different compilers)
and then try to use it in assembler (maybe all objectcodes together)

or try to find some good how-to-link-manuals

* Name mangling
In C++, names are mangled to encode the type of the symbol and allow
overloading.  So it may be called `MerryCallMe__voidfn__void' or
something equally cryptic.  You may have to look at the assembly to find
out what it is.
(vendor specific)

* Calling conventions
Member functions are often passed an invisible argument, which is (I
think) their `this'.  I think it's the first argument under GCC, but may
be wrong.  You'll have to pass it appropriately.
(vendor specific)

> How about you?
just 17 years



More information about the Digitalmars-d mailing list