Xref: utzoo comp.object:439 comp.lang.c++:5569 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!odi!dlw From: dlw@odi.com (Dan Weinreb) Newsgroups: comp.object,comp.lang.c++ Subject: Re: Has X Widget Library Collapsed? Message-ID: <1989Nov20.040415.16653@odi.com> Date: 20 Nov 89 04:04:15 GMT References: <28.UUL1.3#913@acw.UUCP> Reply-To: dlw@odi.com Organization: Object Design, Inc. Lines: 20 In-Reply-To: guthery@acw.UUCP's message of 17 Nov 89 03:29:27 GMT Well, that story doesn't hold a lot of water. For one thing, there is no such thing as "the X widget library"; there are many separate X widget libraries. Some are undocumented, but others have very extensive documentation (such as the Motif library). So whoever told you this story is pretty confused. It's true that the code for the typical X widget (in any of the libraries) is pretty hard to understand. But inheritance is not the cause of the problem. The problem is that they are written in C, which does not provide support for inheritance. The poor widget-writers have to do object-oriented programming without any help from the language. The resulting code is extremely verbose, and, in my opinion, often obtuse. If they used, say (just to pick a language at random :-) C++, the code might be much cleaner. For an example of a user interface toolkit, based on X but not on the X intrinsics, and written in C++, study InterViews. It uses inheritance very heavily, and inheritance makes its code much cleaner and easier to maintain than if inheritance had not been used. Dan Weinreb Object Design, Inc. dlw@odi.com