Re: Fwd: GTK+ is real object oriented?



Yes I agree 100%, very nice and succinct.

One thing I would like to add; however, is that the choice to use an OO-native language or not is not simply a choice of which compiler or language constructs to use . The OO "syntactic suger" incurs a high cost, which is fine if you are running on a powerful processer with large memories. One job I did was to take a pile of C++ written on a PC and port it to a 50MHz ARM processor with only 32KB of RAM and 2MB of flash. This was a very cost sensitive application and thus "adding more menory or MHz" was unacceptable. Just compiling the C++ code as is to an ARM target produced over 512KB of binary. The memory remaing would be completely unacceptable for the large database that also needed to be stored in flash. Not to mention the processing overhead that would be untenable on a 50MHz ARM in this application. After "de-C++ifying" it into standard C, the resulting binary that resulted was about 124KB and ran much faster. Fortunately the programmer I was working with who wrote the original C++ code was very talented and made the job easier in that his code was very clean and easy to work with.

So as for the GTK code, I would say that it is with great thanks that the programmers take on the task of coding with standard C rather than the "easy way out" and using C++ which would likely make GTK untenable in embedded appliations.

Rob

Michael Natterer wrote:
On Sun, 2009-12-20 at 16:16 -0200, frederico schardong wrote:

  
The difference is that not a really object-oriented, is a fake object-oriented.

I call it fake object-oriented environment, maybe not the most
correctly name, but i think is true.

What do you think?
    

Object oriented is a programming paradigm, not a computer
language. Just because C lacks the syntactic sugar to do OO
in a more compact way says *nothing* about the possibility
to use it for OO programming. It is after all turing complete.

There is nothing "fake" here.

The fact that a gas oven has a much nicer user interface
doesn't make an old wood-fired stone oven a "fake" oven.

ciao,
--mitch


_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list

  


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