netconf and python

martin f krafft madduck at debian.org
Wed Sep 19 12:53:05 UTC 2007


also sprach Martin Marcher <martin at marcher.name> [2007.09.19.1043 +0100]:
> Also why not use C++ - yes I know that there are a lot of people
> that for some reason don't like it

The C++ ABI changes too often. If the network configuration is in
danger every time we update C++, the release managers will kill me.
They already have APT to worry about.

That said, I don't see the benefits of C++ when it comes to netconf.
Sure, the STL would be nice(r), but it's not so hard to implement
lists and strings in C either. And as I said, C can be used in
OO-fashion.

> b) using swig (or something else) could probably provide a nice
> interface to scripting languages keeping the ifup ifdown possibilities
> of the current configs...

You can use swig with C, and I am not sure what you mean with the
"ifup ifdown possibilities". netconf has ifup/ifdown/ifupdown
commands.



also sprach Colin Alston <colin at thusa.co.za> [2007.09.19.1104 +0100]:
> Hrm.. well I'm always horribly irritated and frustrated with
> anything to do with C and strings. One of the Twisted developers
> put it well as "you feel like your time would be better served
> sorting oranges by size". C++ does help in these instances with
> better string handling, some crummy OO but still useful to
> a point, vectors which are sort of useful etc, but...

There exist header-only implementations of std::string and
std::vector types for C. The only "problem" is that they're not
strongly typed because they're pointers, but gcc is getting better
by the day with its warnings, and you can use references to structs
to make it even easier.

> a) It's slow. It just is. It's horribly slow

Huh? STL containers? I'd have to disagree actually. C++ itself is
a bit slower than C because of all the overhead, but you're not
going to find more efficient implementations of the algorithms
anywhere outside the STL.

> Either way, Linus himself sums it up here
> http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
> well, without the profanity I mean..

What a gem! :)



also sprach Colin Alston <colin at thusa.co.za> [2007.09.19.1108 +0100]:
> You can always provide big dependency free binaries with Python Freeze 
> ;) But ok, point taken.

And then you'd run into the same ABI-instability problems as you
have with C++.

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
"it usually takes more than three weeks
 to prepare a good impromptu speech.
                                                         -- mark twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/netconf-devel/attachments/20070919/91f99a84/attachment.pgp 


More information about the netconf-devel mailing list