Linked by Eugenia Loli on Wed 2nd Mar 2005 22:13 UTC, submitted by Erik Harrison
Xfce The Xfce Foundation Classes, a lightweight C++ binding for Xfce and GTK has made its first development release, with plans for a stable release around the time of Xfce 4.4.
Order by: Score:
way to go
by - on Wed 2nd Mar 2005 22:52 UTC

Perhaps XFCE will suceed where gnome doesn't? Gnome guys seems to hate C++ - that's OK, C++ is not the best language out there, but so is C.

If you use C++ properly there's not any reason for not using it, just like C, except that C is even more limited for desktop-like apps. Seriously, this is a great step. With C++ on the table and people decided to use it, they could evolve much faster than gnome does. How can people do things like writing evolution in C? It's painful and the one way to face it is throwing people and money on it. They seem to use mono quite a lot these days but not in the core, I wish they'd rewrite the core of gnome 3.0 in C++ or Obj-c and then write the apps in c++/objc/mono/java.

RE: way to go
by Anonymous on Wed 2nd Mar 2005 23:07 UTC

there is already gtkmm which is an STL style GTK C++ binding, if you know the STL, then the ways it does things will already be familiar. XFCE will not suceed where gnome doesn't for 1 reason. it is building on all the gnome architecture which is moving more and more into gtk and its dependancies. without gnome driving gtk xfce wouldn't have anything to work from.

Objective-C better than C++ for GTK+
by dieymir on Wed 2nd Mar 2005 23:41 UTC

I'll prefer that they use Objective-C, it's only a object oriented extension to C, easier than C++ and much more C compatible (actually it's C with OO features provided mostly by a runtime system) so they can rewrite GTK+ parts in Objective-C as needed.

RE: way to go
by Cheapskate on Wed 2nd Mar 2005 23:42 UTC

xfce = Gnome done right

RE: way to go
by - on Wed 2nd Mar 2005 23:56 UTC

"there is already gtkmm which is an STL style GTK C++ binding"

Yes, but Gnome developers hate C++. If xfce developers start using it they can do big things. C++ it's there, it has good compilers, and they've the oportunity of building a good desktop using all the major features (composite, DBUS).

This is exciting stuff
by JeffS on Thu 3rd Mar 2005 00:06 UTC

C++, as complex as it is when looking at the whole language, does offer powerful features that make application development easier than C, such as the STL, namespaces, and exception handling. The programmer just has to use the bits of C++ that make sense for a particular situation, and not try to grasp or implement C++ in it's entirety.

GTK+ is a really good GUI library. But application development with pure C is a big task, and the object system is awkward (since OOP is not supported natively in C).

Thus, it makes sense to have C++ wrappers around the GTK+ library. This will accelerate application development for Xfce.

I've written programs in both GTK+/Gnome and QT/KDE, and QT, a C++ widget library, is much much easier. Rapid application development with QT/QMake/QT Designer is a piece of cake. I can see, by looking at the XFC website, that Xfce Foundation Classes have the same potential.

Now perhaps they can come out with an XFC binding to Glade, or some visual IDE, then XFC will be really rolling.

GTKmm seems pretty powerful, but it seems the Gnome devs aren't embracing it as much as they should. They seem to stick to pure C or go with Mono (or Python). Nothing wrong with that, but C++ wrappers have the potential to give the speed and low memory imprint of C programs, with the ease of development of higher level languages like C#/Mono or Python. QT definetly accomplishes this. XFC seems to have the same potential.

C++
by Lumbergh on Thu 3rd Mar 2005 00:47 UTC

Traditionally many Unix programmers have shyed away from C++ for various reasons. In fact, besides the licensing problems that QT had and still has, de Icaza has stated that he's no fan of C++. There wasn't even a standard until, what, '98 or so?

Many Gnome people are jumping over C++ altogether and doing stuff in C# or Python, which makes sense for most GUI stuff.

RE: way to go
by Anonymous on Thu 3rd Mar 2005 01:05 UTC

"If you use C++ properly there's not any reason for not using it, just like C, except that C is even more limited for desktop-like apps. Seriously, this is a great step. With C++ on the table and people decided to use it, they could evolve much faster than gnome does. How can people do things like writing evolution in C? It's painful and the one way to face it is throwing people and money on it. They seem to use mono quite a lot these days but not in the core, I wish they'd rewrite the core of gnome 3.0 in C++ or Obj-c and then write the apps in c++/objc/mono/java."

I agre with you 100%. Hell, the KDE camp has shown the Unix world that C++ does the job quite well. I'm looking forward to future releases of XFCE.

Underscores everywhere
by SpookyET on Thu 3rd Mar 2005 01:09 UTC

What's up with the ugly underscore naming thing?

RE: Underscore everywhere
by Lumbergh on Thu 3rd Mar 2005 01:21 UTC

Uhmm, gtk+ uses Pascal notation for types and the underscore for methods. I don't know how anybody could call it "ugly" when it's more readable than camel/pascal notation for methods.

Re: C++
by Anonymous on Thu 3rd Mar 2005 02:21 UTC

When it comes to standards, python is far worse than C++. It's constantly changing (decorators), has superfluous features (like generators, lambda functions and such). They can be useful, but IMO they just litter the language. You know, they say the more ways you accomplish one thing, the worse.

Which is a pity, because I liked the simplicity combined with flexibility. Now the simplicity is going away. Sure you don't have to use those features if you don't want to, but you'll have to live with other people's code making use of them. And you constantly have to update the interpreter in order to stay up to date with modern code.

IMO they should focus on improving the interpreter, making it thread safe, equipping it with a real garbage collector. They should also decide which features are necessary, which aren't and create a standardized version of the language.

RE: Re: C++
by Anonymous on Thu 3rd Mar 2005 02:37 UTC

You should take a look at PEP 3000 (Python 3000). A major emphasis is on simplication and weeding out redundancy.

http://www.python.org/peps/pep-3000.html

by Anonymous on Thu 3rd Mar 2005 03:34 UTC

Except that nobody writes GUIs in pure C, yes even the GNOME developers don't. Have a look at Glib and the Gobject system sometime, okay?

@Lumbergh
by SpookyET on Thu 3rd Mar 2005 03:35 UTC

I fild MyMethod() more readable than my_method();

@SpookyET
by Anonymous on Thu 3rd Mar 2005 03:41 UTC

I find my_really_obnoxiously_long_method() easier to read than MyReallyObnoxiouslyLongMethod().

...
by Anonymous on Thu 3rd Mar 2005 04:15 UTC

This is a good thing, there are a lot of C++ libraries out there and now you can use it with GTK+. Hopefully it will be preinstalled, and then it will all be up to the documentation. If these requirements are met, than I'm satisfied. The libraries will develop over time, there's a lot of standard C++ code out there.

...
by Anonymous on Thu 3rd Mar 2005 04:17 UTC

Ofcourse C++ is for people who have a mind of their own, and are not helplessly dependant upon vendors and advertising.

Great C++ gui toolkit already exists: FLTK
by Robert A on Thu 3rd Mar 2005 05:49 UTC

Take a look at FLTK. http://fltk.org It really is a sleeper C++ gui toolkit. So much attention on GTK+, Qt. GTK+, as metioned, does not use C++ and Qt is an application framework that is a proprietary superset of C++ with all the bloat that goes along with it. Neither uses pure C++. FLTK's binaries are statically linked and SMALL. Some have previously said FLTK is ugly but I'm sure they haven't seen the latest plastic theme. Take a look.
http://fltk.org/images/fltk-widgets-plastic.png
Plus it's so easy to code OOP style gui's that I've written a tutorial http://fltk.org/links.php?V19 and I'm not an expert.
BTW I use XFCE as my DE.

RE:Great C++ gui toolkit already exists: FLTK
by dave on Thu 3rd Mar 2005 07:58 UTC

fltk is a good toolkit if you are planning to write
a hello_word application.
Try to use it to handle a full threaded socket based x11 compliant application, and all the fltk magic will disappear asap.

dave

...
by Anonymous on Thu 3rd Mar 2005 08:43 UTC

Stroustrup told me that he will write an application in C++ and than after that he will consider which GUI toolkit to use, and than do a very basic GUI. He has used QT in the past and said that it was a good library, but than again the GUI interface is the last thing on his mind when he writes software. We should be able to write software that is mostly GUI independant, not in the sense of write once run everywhere, but that the GUI code should be isolated and interchangable.

Hubris
by johnlein on Thu 3rd Mar 2005 09:19 UTC

Everybody knows that you write methods and functions thisWay(), Pascal notation is ForClassesOnly(). Underscores are_for_variables, and dot get me started on CONSTANTS.

ABI
by raskolnikov on Thu 3rd Mar 2005 09:55 UTC

One of the greatest problems with gcc/c++ has to be the ever changing ABI (If i have understood it correctly).

Crap
by anonymous on Thu 3rd Mar 2005 10:30 UTC

Did they have to ruin one of the few lightweight yet rather
featureful desktops for *nix.

:-(

No Crap
by johnlein on Thu 3rd Mar 2005 11:04 UTC

Dude, they are NOT going to rewrite anything in C++. XFC is there to make it possible to write apps for XFCE in C++ and in C. XFCE won't include apps in the base distribution anyway, so why worry?

I have to say this is an incredibly impressive toolkit. Apparently it was based on Havoc Pennington's old Inti project, which I thought had died out.

What's really impressive, though, is the incredible volume of clear, in-depth documentation. I could see this becoming very popular in the near future.

With regard to language wars, C is a better designed language than C++, however proper inheritance and OOP make large application design easier, which gives the edge to C++. The trick is to adopt a programming style which avoids the nasty pitfalls C++ has on offer. This library seems to do just that.

Re: Crap
by matthieu on Thu 3rd Mar 2005 11:45 UTC

Why should a C++ app be heavyweight ?

IMHO, I think it's good to have a C++ binding for XFCE. Developers who prefer C can still use C.

More choices => more apps (I hope)

@matthieu
by emacs on Thu 3rd Mar 2005 13:27 UTC

Does the string class play nicely with STL? The two big downchecks for Qt for me are the MOC and the non-use of the standard library (at least in earlier versions).
I grasp that Qt predates the C++ standard, and is to be commended for being ahead of its time. I'm just arguing that learning non-standard things is a distraction.

duplicated effort
by mike on Thu 3rd Mar 2005 15:33 UTC

gtkmm and wxGTK already exist. What is the point of creating yet another GTK based of C++ classes? Why not cooperate with an existing project?

duplicated effort
by mike on Thu 3rd Mar 2005 15:35 UTC

GTK-based set of C++ classes I wanted to say.

RE: Duplicated Effort
by Bryan Feeney on Thu 3rd Mar 2005 15:44 UTC

It's not a duplicated effort. C++ is a complex multi-paradigm language and there are many ways of programming in it.

GTKMM uses the STL style of OOP programming. XFC uses the Java style of OOP programming. The latter is by far the most popular and is arguably easier to program in.

Futher wxWidgets is a COMPLETELY different library which just happens to bind to GTK+ (it can also bind to Motif). It does not allow you to perform Glib style programming, XFC does.

This is not a duplicated effort. It is in fact quite promising. Speaking as a Qt and Java fan, I can tell you that this API is quite similar in style and scope. It's equivalent to Mono in terms making GUI programming easy.

RE: Duplicated Effort
by mike on Thu 3rd Mar 2005 15:50 UTC

Thanks Bryan.
It did clarify some things. I really like XFCE (and use it daily) and wish them the best both in their desktop environment effort and with the XFC.

Re:RE: way to go
by Jeff Franks on Fri 4th Mar 2005 08:40 UTC

"XFCE will not suceed where gnome doesn't for 1 reason. it is building on all the gnome architecture which is moving more and more into gtk and its dependancies. without gnome driving gtk xfce wouldn't have anything to work from."

Please, if you are going to make ill-informed comments like this at least include your name Mr. Anonymous, so we can all laugh at you.

Xfce does not use the GNOME architecture, it uses the GTK+ architecture only!

Just now?
by QV on Fri 4th Mar 2005 14:17 UTC

They're just introducing C++ bindings now?

*sigh*

Writing GUI code in C is flat-out braindead.

Finding out that XFCE was written in C made me lose a massive amount of respect for the developers. The use of C is one of the many reasons I despise GNOME, and I had previously considered XFCE to be a more tolerable alternative to GNOME.