[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: next PCB release - 1.99za vs 4.0



On Thu, 2010-09-09 at 08:41 -0700, Andrew Poelstra wrote:
> On Thu, Sep 09, 2010 at 12:34:11PM +0200, Frank Bergmann wrote:
> > On 09.09.2010 11:54, Peter Clifton wrote:
> > >I'm not sure I see the point of making the whole top-level window a
> > >dedicated widget per-se, although the goal to encapsulate various state
> > >variables sounds excellent.
> > >
> > >I was never really sure what point to start sub-classing to make a new
> > >widget. My acid test was usually whether that widget had useful
> > >self-contained functionality which could be re-used in other places.
> > 
> > If sub-classing a widget is really in focus, then proposal of
> > (partly) switching to C++ comes in mind.
> >
> 
> My primary goal in doing things this way was to make a C++ port easier
> and come out more C++-looking.

I've coded C++ before, and have spent a lot of time coding C / GTK
stuff. I personally prefer C, and would like to see the core of PCB
remain in C, possibly forming the basis of some notional "libpcb". C++
bindings for this would presumably be completely do-able.

GUIs might be suited to C++, but that obviously depends on the toolkit
used. Qt / Wx would obviously be C++. GTKMM isn't bad by the looks of
it, but it somehow feels nicer to code GTK stuff in its native C.

There is good / bad C coding style, and IMO PCB is filled with a legacy
of very old style code which is not a shining example of how clean C
programs can be.

At the very least, I'd love the first step before a possible C++ port,
to be as you suggest - cleaning up the old C code to make it more modern
and readable.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user