Hi,<br><br>To me sounds a good idea, if we are implementing without STL. We had many discussion earlier to have C++ based implementation. But it end up in the believe that we will not get good performance. But this we can check once we have an implementation.<br>
<br>-Br<br>Naveen<br><br><br><div class="gmail_quote">On Fri, Oct 8, 2010 at 1:07 PM, Jacques Guillou <span dir="ltr">&lt;<a href="mailto:jacques.guillou@gmail.com">jacques.guillou@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p>Hi,</p>
<p>I am working on a project which has some similarities with DBUS, since it&#39;s an IPC framework involving a daemon process which dispatches messages to clients connected to it over a UNIX domain socket.<br>
It&#39;s currently completely written in C. Since the daemon has to support some pluggable components, I use some C structures which mainly contain function pointers pointing the my plugins specific function.<br>
These structures can be seen as a virtual function tables as they are know in the C++.<br>
Since implementing this in C is actually quite painful and error prone, I wondered whether it would make sense to implement this in C++ instead of C, WITHOUT using STL.</p>
<p>According to me, there are already a lot of benefits of using the C++ language itself over C :<br>
- Helps making the design of your application cleaner, when using object oriented concepts<br>
- Provides stricter type checking<br>
- Allows using templates</p>
<p>Now the drawbacks (?):<br>
- Need a C++ compiler (nowadays, there&#39;s one on every platform we support, right ?)<br>
- Need to link against libstdc++ library (this can be avoided, as it is described in this thread : <a href="http://stackoverflow.com/questions/1653047/avoid-linking-to-libstdc" target="_blank">http://stackoverflow.com/questions/1653047/avoid-linking-to-libstdc</a>)</p>


<p>So now my question : Would it make sense (or would it have made sense) to implement DBUS in C++, without using any of the C++ libraries (STL, libstdc++, etc...), since the language itself provides some benefits over C, without any drawback (apart from the fact that some people don&#39;t know C++) ?</p>


<p>What do you think? </p>
<p>Best regards<br><font color="#888888">
Jacques</font></p>
<br>_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
<br></blockquote></div><br>