[Libssh] Enhancements proposals
Aris Adamantiadis
aris at 0xbadc0de.be
Thu Feb 28 17:08:07 CET 2008
Rodolphe Rocca a écrit :
> On Wed, 27 Feb 2008 23:38:02 +0100
> Aris Adamantiadis <aris at 0xbadc0de.be> wrote:
>
> Are you sure you want to switch to a C++ version ? I mean, libssh has
> already a good OO design in C, it is not so far from a _very good_
> OO design. Furthermore, there is the classical argument in favor of C :
> everything can link to it. Personnally I don't see a very strong reason
> for a protocol library to use C++.
The ease of development ? Doing a good OO design is C is nearly
impossible. There is no inheritence, no virtual methods,... look at the
mess in error.c to support inheritence (ssh_set_error that works on two
datastructure) and the mess in crypt.c to support virual methods.
There are frameworks like glib to support OO in C. I find it a bad
solution, because it's even less portable to other platforms (windows or
embedded anyone ?) and it only makes the road more suitable to a car
with square wheel rather than rounding the wheels.
C and C++ are completely compatible : it's easy to build a C stub which
runs the C++ methods behind.
>
>> More information about the C++ version: it would be the version 0.3.
>> I'd keep a small C stub layer to keep compatibility with C apps and
>> previous work using libssh 0.2. So the C version as it is would
>> deprecate (even if I'm certainly going to reuse most of the 10.000
>> lines already written).
>
> It's going to be much work to keep both C/C++ API.
maybe a lot less than doing strong OO with C alone...
>
>> Thus, I think a good action I have to make to repair my lack of
>> attention is to install a correct bug manager (I think about mantis).
>> That way, every bug report and feature request would be kept
>> somewhere. Also, I promise working a day or two this week to address
>> some of the known bugs and include the patches.
>
> It would be very very good for us if you could setup a git repository
> somewhere for source control. And it would be good for you too making
> really easy to merge patches and developpers branches.
>
> NB : For those who don't know git is a distributed source management
> software used by the Linux kernel, and many of the big free software
> projects.
I already have a SVN repository on berlios. I don't know what features
of git lacks in subversion
Regards,
Aris
More information about the Libssh
mailing list