On 01/25/2012 10:01 AM, Zachary Lund wrote:
On 01/25/2012 11:41 AM, bls wrote:
On 01/25/2012 09:07 AM, Trass3r wrote:
Whats.necessary to use D in order to create C++ bindings ?

github.com/jacob-carlborg/dstep

Quote "
DStep is a tool for converting C and Objective-C headers to D modules.
"
Well THAT'S nitty gritty :)

C++ as well ? How ? And maybe the most imp[ortant point when ?

Don't get me wrong Jacob. In case that dstep is working perfect for C++
hallelujah.

(I am nevertheless convinced that porting from XML output has several
advantages. Multi pass code generation.

Bjoern
---------------------------------------------------------------------
Slightly Off Topic DWT (Keinfarbton) f.i. was born on a idea of mine.
Frank and I have discussed the idea of using Java2XML (ANTLR based) to
generate D code )

I'm going to be rather straight forward on my opinion and, possibly, my
ignorance. I think C (or any language with no symbol mangling) is an
ideal language to create a library which is usable globally in almost
any language. I think C++ libraries are an ideal language to create a
library which is going to be used only within the C++ community because
of it's ill symbol mangling system. There is no "right" way to work with
C++ in D and although there are ways to interface with C++, I do not
think that is the ideal situation.

That being said, libraries like wxWidgets are very large and have been
acquired over several years of hardwork by a very large group. I do not
think that a GUI toolkit library should have to bother with networking,
sound, and so on. Also given the "standard" library D has, I think the
GUI library D can provide should use Phobos extensively rather than its
own mechanisms.

I think the ideal situation is to have a native D library. Creating
binds to a C++ library is only a temporary solution and is not ideal
both in implementation and in usage.

I do not mind using a C library in D because of how straight forward it
is. But simply mentioning C++ in D seems to add unneeded complexity
which should be avoided. I think the answer to a question such as
"What's the alternative to Qt in D?" should not be "Qt bindings" but
maybe a library which imitates the implementation and/or interface of Qt
UI widgets in native D.

Another problem this causes is the seemingly unneccessary time needed to
develop such libraries. I kinda regret saying this but using a C library
in an OOP wrapper can be optimal and easy to work with. Perhaps adding
to GTK+ as a C library for functionality that we want would be more
ideal than trying to mess with C++.

I personally think the SIMD feature is much more important than trying
to mess with C++.

Thanks for the  feedback.
well, I think we have very different views.

Unfortunately I am not a student anymore instead I am a unhappy tax payer.
To fulfill my Job I need GUI,RIA(WEB), Database and XML(SOAP) support. To say the least. So pretty much everything D is not able to deliver atm. We are buying 3 party add ons in a few kilo bucks region and unfortunately we have to work with a Tool chain which is far away from being perfect. In other words the D language is already offering more than we need,could be an option, but the library situation is a disaster.

wxWidgets. Do you really care about wrapped vs native library ?
Do you think that the D community will ever be able to create a wxWidgets comparable native D lib. while not being able to spend some time in creating a binding generator ? I would be glad to have such bindings !

My 2 cents.

Reply via email to