On Wed, Mar 12, 2003 at 09:30:05PM +0000, Tom Payne wrote: > On Wed, Mar 12, 2003 at 05:09:25PM +0100, Max Kellermann wrote: > > You are not required to link the C++ library if you don't use it. No > > overhead here. > > Assuming you have a recent OS, like Linux, Solaris, etc.: > > If you're running any other programs that are written in C++ then the > C++ library will already be in memory and shared between processes so it > costs you nothing. > > If you're not running any other C++ programs and link to the C++ library but > don't use it then it'll just get paged to disk and not consume RAM. > > So basically, it's unlikely to cost you any memory even if you use it. > > There are plenty of good reasons for not using C++, but memory usage of the > standard libraries isn't one of them. > > C++ is a big, nasty, bloated language but one of it's design decisions is > that you don't pay for what you don't use. So you can pick the features that > you want and ignore the others. This means, for example, that you could use > classes and nothing else and you won't pay for templates, operator > overloading, RTTI, etc.
Yes, I think you're right. G++ used to be worse at generating code than gcc, but I think that's fixed in recent versions. > <rant> > > I do find ion's OO-system quite impenetrable -- everything seems hidden > behind 10 layers of mutually recursive macros, and the class heirarchy isn't > documented anywhere. While I'm sure it's clear in Tuomo's mind it does seem > to discourage others from contributing code. Witness only one serious module > (ion-dock) and all other patches being on a very small scale (no disrespect > to the authors). I would much rather see Ion written either in C++ or C with > the glib/gtk object system. This would make the code much more transparent > to non-Tuomos and automatically provide for support for things like linked > lists, UTF-8, antialiased fonts, module loading, etc. etc. > > </rant> I don't find ion's OO system hard to understand (obviously?). Not harder than gtk's, at least. I think it would be easy for anybody to understand if it was documented. Using C++, however, could provide a benefit, but it has to be done properly. Fortunately, I am sure Tuomo would do it properly if he decides to do it. > <fantasy> > > My ideal Ion would: > * be written in C/C++ > * use gtk for as much as possible (modules, drawing, etc.) > * use librsvg for drawing decorations (tabs) (mmm, eye candy) No, that's way too much dependencies. Instead, I think it should be possible (if it isn't already) to place window decoration code in separate modules. Then you could write your own decoration module that uses gtk/svg/whatever without imposing additional dependencies on other ion users. > * use lua for configuration (mmm, scripting) I definitely agree with this one. I've been thinking of writing that lua interface for ion but I haven't accomplished very much yet. I would like to use SWIG 1.3 to generate the interface but there's no lua backend yet. I've began to write one but not got very far. Of course, an interface generator would not have to be used to just create interfaces for calling registered functions and configuration commands. > </fantasy> > > <reality> > > ion-devel-20030131/ion-dock works brilliantly :-) > > </reality> > > Hope I haven't offended anyone :-) Not me :) /Pelle
