class Child : public Parent {
void Print() { cout << "Child" << endl; }
}
(please excuse the lack of constructors, and public: lines)
and in code, you do something like:
Parent *p;
Child *c = new Child();
p = c;
p->Print();
in C++, this will print out "Child".
In C/GTK+, you could not have two methods called "Print()" which would execute different code.
So, if you wrote code which operates only on "Parent" objects, and calls methods on the subclasses which are referenced by a "Parent" object.. you can not do this in C/GTK+ because you would have two functions with the same name.
Think back to the list example I gave earlier if you wonder why anyone would ever want to do this.
(you know the interface to the objects you are working with, but the implementation is not important to the code.)
Overloading is more than operators.
Overloading is also re-implementing methods from the superclass, and having more than one method with the same name, but different signatures.
You can not have two functions in C with the same signature. (Or two functions with the same name and different signatures!) So, from what you said, you can not have each GTK "subclass" have the same function name for whatever "methods" you bind to a GTK object.
This means that you can _not_ use a subclassed GTK object anywhere the superclass GTK object is used, which breaks one of the fundamentals of OO.
Could you please explain exactly how GTK+ does inheritance? I don't get it.
can I put a bunch of GTK+ "objects" in a list (of the superclass type), pull them out later on and call a method which does the apropriate action based on whatever type that object may be?
Think of a list of "Drawing" objects. Pen, pencil, etc.. Each object inherits from the "Drawing" superclass. I put all sorts of pens and circles, etc on a list. Later on, I pull them out in a loop, assigning them to a variable of type "Drawing". I can then call Drawing::Paint() on each object, and it will execute the code of the appropriate object type. This works in C++, Java and Smalltalk quite easily.
Given that C does not allow you to overload operators, I don't see how this can be done.
You're not going to change the entire object model.
You can't just take code from Qt and put it in glib.
If you can tell me a way to do this without an abstraction layer, I'll believe that you did not really mean abstraction layer.
The idea is still worthless, and i think you should read the rest of the replies to your post.
Is your head so far up in the clouds that you do not see the codebase in use already? Do you really expect everyone to change their code to match a new api? Keep in mind that there are people who use Qt and gtk commercially. Trolltech has a commitment to their customers to keep their API the same.
Qt is C++, and takes advantage of advanced c++ features such as inheritance. You can't exactly do that in C. (without a bunch of pre-processor crap)
The entire object model is different. You could create a wrapper which is another layer of abstraction between the toolkits.. but most people don't understand that Qt is much more than a widget library.
There is stuff in Qt today that will take some time to implement in gtk+ or glib. Why would you want an abstraction layer that couldn't do everything both toolkits have to offer?
If you made an abstraction layer, you would use _more_ memory than before! The whole idea is worthless in my opinion.
I was under the impression that you just needed to license Qt if you were developing non-free software. I don't think sun would have to pay a license fee for every copy of the OS shipped.
I have my credit card billing address to my address at school. Over the summer, when I am not at school, it is not worth changing the shipping address for 3 months, and changing it back. This is mainly because they fail to do so, no matter how many times I fill out the address change form.
anyway, if I use my CC at home, the bill goes to school, and gets forwarded to home. I think a lot of students do this.
What if the md5 server cached hashing values? At the moment, doesn't the IM server request a different hash each day? Until they made it request a different hash each time, load would not be that bad...
It is easy to switch from computer engineering to computer science. It is not always as easy to go the other way around. Try computer engineering, and if you don't like it, you can switch to computer science.
At least they admit that things can crash. Don't tell me you have never had netscape, mozilla, or explorer crash on you. KFM's web browsing code was very simple. What they have now is very complex, and is still not quite bulletproof. It's close, though. They are just being honest here.
If you want to work on this, I'm sure no one will object.
They have already done quite a bit in terms of unification, though. They have a common.desktop file standard (although gnome can not handle UTF8 in them.. =/), xdnd, and a common window manager specification.
What sorts of bridges do you want? Where exactly is the incompatability between the two? With kde's xparts, you should be able to run gnome applets in kicker (the kde panel). It would take a bit of coding, but it could be done.
Anyway, I don't really see too much of an incompatability with the way things are done now. If the two projects were to merge, there would be less progress than there is now.
I don't know about the rest of you, but kde 2.1 doesn't feel at all beta-ish to me. If you get random crashes for no reason, you probably have bad binaries from a poorly packaged rpm. (or deb) I've been compiling kde from source for a long time now, and have hardly any problems with things crashing. It is very stable now.
So what if the browser is integrated with a desktop environment? The issue with MS was that it was integrated with the operating system. There is a big difference.
to clarify, you can not _always_ use a subclassed GTK object anywhere the superclass GTK object is used.
For example:
(sorry for the C++ like syntax here)
class Parent {
virtual void Print() { cout << "Parent" << endl; }
}
class Child : public Parent {
void Print() { cout << "Child" << endl; }
}
(please excuse the lack of constructors, and public: lines)
and in code, you do something like:
Parent *p;
Child *c = new Child();
p = c;
p->Print();
in C++, this will print out "Child".
In C/GTK+, you could not have two methods called "Print()" which would execute different code.
So, if you wrote code which operates only on "Parent" objects, and calls methods on the subclasses which are referenced by a "Parent" object.. you can not do this in C/GTK+ because you would have two functions with the same name.
Think back to the list example I gave earlier if you wonder why anyone would ever want to do this.
(you know the interface to the objects you are working with, but the implementation is not important to the code.)
-- Thrakkerzog
Overloading is more than operators.
Overloading is also re-implementing methods from the superclass, and having more than one method with the same name, but different signatures.
You can not have two functions in C with the same signature. (Or two functions with the same name and different signatures!) So, from what you said, you can not have each GTK "subclass" have the same function name for whatever "methods" you bind to a GTK object.
This means that you can _not_ use a subclassed GTK object anywhere the superclass GTK object is used, which breaks one of the fundamentals of OO.
am I missing something?
-- Thrakkerzog
Oh, just so you know that this is really part of inheritance, there is the subclass rule, which is a big part of OO.
Everywhere an instance of the superclass is used, a subclass of the superclass can be used instead.
-- Thrakkerzog
Could you please explain exactly how GTK+ does inheritance? I don't get it.
can I put a bunch of GTK+ "objects" in a list (of the superclass type), pull them out later on and call a method which does the apropriate action based on whatever type that object may be?
Think of a list of "Drawing" objects. Pen, pencil, etc.. Each object inherits from the "Drawing" superclass. I put all sorts of pens and circles, etc on a list. Later on, I pull them out in a loop, assigning them to a variable of type "Drawing". I can then call Drawing::Paint() on each object, and it will execute the code of the appropriate object type. This works in C++, Java and Smalltalk quite easily.
Given that C does not allow you to overload operators, I don't see how this can be done.
Please enlighten me.
-- Thrakkerzog
Aha! You mention an abstraction layer!
Plbttth!
:-)
Hey look! These two languages are really producing machine code underneath.. why don't we merge the two?
-- Thrakkerzog
Qt is C++. There are bindings to other languages.
You're not going to change the entire object model.
You can't just take code from Qt and put it in glib.
If you can tell me a way to do this without an abstraction layer, I'll believe that you did not really mean abstraction layer.
The idea is still worthless, and i think you should read the rest of the replies to your post.
Is your head so far up in the clouds that you do not see the codebase in use already? Do you really expect everyone to change their code to match a new api? Keep in mind that there are people who use Qt and gtk commercially. Trolltech has a commitment to their customers to keep their API the same.
-- Thrakkerzog
Well, let's see..
Qt is C++, and takes advantage of advanced c++ features such as inheritance. You can't exactly do that in C. (without a bunch of pre-processor crap)
The entire object model is different. You could create a wrapper which is another layer of abstraction between the toolkits.. but most people don't understand that Qt is much more than a widget library.
There is stuff in Qt today that will take some time to implement in gtk+ or glib. Why would you want an abstraction layer that couldn't do everything both toolkits have to offer?
If you made an abstraction layer, you would use _more_ memory than before! The whole idea is worthless in my opinion.
-- Thrakkerzog
like my X10 firecracker module can? :-)
-- Thrakkerzog
I was under the impression that you just needed to license Qt if you were developing non-free software. I don't think sun would have to pay a license fee for every copy of the OS shipped.
It is a per-developer license, not per end user.
-- Thrakkerzog
I have my credit card billing address to my address at school. Over the summer, when I am not at school, it is not worth changing the shipping address for 3 months, and changing it back. This is mainly because they fail to do so, no matter how many times I fill out the address change form.
anyway, if I use my CC at home, the bill goes to school, and gets forwarded to home. I think a lot of students do this.
-- Thrakkerzog
Hmm..
:-)
modem users could still use toc..
What if the md5 server cached hashing values? At the moment, doesn't the IM server request a different hash each day? Until they made it request a different hash each time, load would not be that bad...
Still, I guess it is a pipe dream.
-- Thrakkerzog
oops, I did not know that the length was an option for the hash. :-(
Even so, you could get away with not hashing a lot of the possibilities, as they could not afford to receive values over a certain size.
Anyway, quite a predicament..
-- Thrakkerzog
If you pre-hash the entire aim.exe, it would reduce the load quite a bit. It would take a lot of disk space, but would help reduce server load.
-- Thrakkerzog
i proposed this idea to the lead gaim developer some hours ago..
We'll see what happens!
-- Thrakkerzog
How bad is the license? Has anyone actually looked at it?
-- Thrakkerzog
I like them as a portal, though..
Especially for fantasy sports leagues. They really keep on top of those, and they are a lot of fun.
I rarely search for anything on Yahoo now, though. I go straight to google.
-- Thrakkerzog
Quazi, I think. :-)
-- Thrakkerzog
It is easy to switch from computer engineering to computer science. It is not always as easy to go the other way around. Try computer engineering, and if you don't like it, you can switch to computer science.
-- Thrakkerzog
so kde chose stability over speed in this case. Big deal. I'd rather have one konq window die than all of them.
-- Thrakkerzog
keep a konqueror window open, and press ctrl n.
It should be about the same speed as on your windows box.
You are not opening a konqueror window, but starting a konqueror process by running konqueror.
-- Thrakkerzog
At least they admit that things can crash. Don't tell me you have never had netscape, mozilla, or explorer crash on you. KFM's web browsing code was very simple. What they have now is very complex, and is still not quite bulletproof. It's close, though. They are just being honest here.
-- Thrakkerzog
If you want to work on this, I'm sure no one will object.
.desktop file standard (although gnome can not handle UTF8 in them.. =/), xdnd, and a common window manager specification.
They have already done quite a bit in terms of unification, though. They have a common
What sorts of bridges do you want? Where exactly is the incompatability between the two? With kde's xparts, you should be able to run gnome applets in kicker (the kde panel). It would take a bit of coding, but it could be done.
Anyway, I don't really see too much of an incompatability with the way things are done now. If the two projects were to merge, there would be less progress than there is now.
I don't know about the rest of you, but kde 2.1 doesn't feel at all beta-ish to me. If you get random crashes for no reason, you probably have bad binaries from a poorly packaged rpm. (or deb) I've been compiling kde from source for a long time now, and have hardly any problems with things crashing. It is very stable now.
-- Thrakkerzog
So what if the browser is integrated with a desktop environment? The issue with MS was that it was integrated with the operating system. There is a big difference.
-- Thrakkerzog
is that kids think white people look better in lavender dresses!
-- Thrakkerzog
Those guys get waffles or french toast for lunch?
Lucky ducks!
-- Thrakkerzog