Linked by Quentin Hartman on Mon 14th Jul 2008 08:46 UTC, submitted by makkus
GTK+ At last week's Guadec meeting, Kristian Rietveld delivered the GTK+ "state of the union" report. GTK+ is the multi-platform toolkit behind a number of popular applications and, perhaps most well known, the Gnome Desktop environment for Linux. Read the full report here.
Thread beginning with comment 322810
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: private structure fields
by kaiwai on Mon 14th Jul 2008 13:40 UTC in reply to "private structure fields"
kaiwai
Member since:
2005-07-06

In my humble opinion this is yet another example that object-oriented programming in C is a bad idea and that when you start doing this, it is more than time to start using C++... in fact I can hardly remember the reason why GTK and GNOME still refuse to use at least some features from C++. The two arguments mentioned are a) "C++ libraries are harder to make bindings for" and b) "C++ doesn't have a standard ABI". Well, as has often been said, these arguments are not convincing: a) there exists Qt bindings to a plethora of languages, and b) since each released distro sticks to one compiler version (like "gcc 4.2.3") it doesn't matter if the C++ ABI is not always preserved across versions.


I know this sounds stupid, but why not Objective-C? I've looked through it, and its a damn site nicer to use and look at than C++. Its well supported and developed for, increasing numbers are taking an interest in it as the user base grows.

Right now Objective-C 2.0 brings garbage collection and many other features. I know it'll take a while, but compared to C++, its the lesser of two evils at the moment.

Reply Parent Bookmark Score: 2

RE[2]: private structure fields
by YEPHENAS on Mon 14th Jul 2008 14:52 in reply to "RE: private structure fields"
YEPHENAS Member since:
2008-07-14

With Objective C it would not be easy to have bindings for static typed languages. Also the Smalltalk-style syntax doesn't map very well to most other languages.
I think GTK+ 3.0 should be implemented in Vala (at least partially). It's designed for the GObject type system and results in the same ABI as C libraries.

Reply Parent Bookmark Score: 2

sanctus Member since:
2005-08-31

is Qt not bind to Cocoa on OS X? Never tried, but isn't possible to code OS X application in C,C++ or Obj-C in xcode?

Reply Parent Bookmark Score: 2

YEPHENAS Member since:
2008-07-14

Vala code does not only compile to GObject/C libraries, the compiler also will create interface files for GObjectIntrospection, which can be used for example from Python to bind GObject libraries at runtime:

http://blogs.gnome.org/johan/2007/11/30/future-of-gnome-language-bi...

Reply Parent Bookmark Score: 2

JMcCarthy Member since:
2005-08-12

Nicer to look at? You're kidding, right? ;) It takes two of the ugliest known languages known to man and mashes them together.

They each have features the other doesn't, they both have things one does better than the other. Speaking as a C++ programmer, there are many things I can't live without, and while I realize the same may be true for an Objective-C programmer, my side wins because there are by far more stubborn C++ programmers. :-D

Reply Parent Bookmark Score: 6

YEPHENAS Member since:
2008-07-14

Nicer to look at? You're kidding, right? ;) It takes two of the ugliest known languages known to man and mashes them together.

I totally disagree that Smalltalk is an ugly language. It's actually one of the best and most beautiful programming languages together with LISP. But I wouldn't want to see it mixed with C code. And Objective C has no blocks/closures, which actually are one of the most important features of Smalltalk.

Edited 2008-07-14 16:03 UTC

Reply Parent Bookmark Score: 1

ebasconp Member since:
2006-05-09

What about Vala?

What about written a real Vala compiler that receives as input a Vala source code and outputs a binary GTK+ compliant?

Vala is a very nice programming language and is GTK+ centric, so will model everything à la GTK+... no wrappers, idioms or verbosity needed.

Reply Parent Bookmark Score: 2

YEPHENAS Member since:
2008-07-14

What about Vala?

What about written a real Vala compiler that receives as input a Vala source code and outputs a binary GTK+ compliant?

Would be possible, but the current solution with C as an intermediate language has the advantage that you get all C compiler optimizations for free. And it is possible to distribute the generated C source along with the source tarball. So if someone wants to compile the application for his platform he wouldn't even need the Vala compiler.

Using C as an intermediate language for compiling is not uncommon. For example Eiffel does this, too.

Vala is a very nice programming language and is GTK+ centric, so will model everything à la GTK+... no wrappers, idioms or verbosity needed.

Actually it's GLib centric. ;) You can write object oriented applications without any GTK+.

Reply Parent Bookmark Score: 2

Hugo Member since:
2005-07-06

What about Lua - http://www.lua.org

I'm also a c++ programmer, but i kind of like Lua for some reason, it just seems right.

Reply Parent Bookmark Score: 2