Re: [gtk-list] Re: Excuse me for mentioning the unmentionable, but...
- From: "Brett W. McCoy" <bmccoy lan2wan com>
- To: iisteve iifeak swan ac uk
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Excuse me for mentioning the unmentionable, but...
- Date: Mon, 15 Jun 1998 10:59:06 -0400 (EDT)
On Mon, 15 Jun 1998, Steve Hosgood wrote:
> The point (AFAIK) would be that people who write all these wonderful
> applications for X would also be able to cross-compile them so that they'd
> be runnable by Windoze Lusers.
As you point out below, though, the underlyoing architectures are so
vastly different than porting would be quite a headache.
> As for the practicality of such a thing, well there's the rub. From
> my limited experience of writing Windoze 3.11 programs with the pure
> API as described (rather well) in Charles Petzold's book, I'd say that
> such cross-portability is a pipe dream.
I'm currently studying the Win95 API (in Petzold's updated book), and the
underlying programming interface is still the same, using the plain ol' C
style of Windows programming (OWl or MFC is a different story). There's
still the WinMain function, as well as the WinProc callback and all of
those windows registration requirements and the message handling with the
long switch statements. I imagine a lot of this could be hidden within a
GTK port, but you can't get around the WinMain/WinProc requirement, so it
wuld require some tailoring to do recompiling from X to Windows in that
regard.
> Windoze isn't a proper multi-tasking environment. Or at least, W3.11
> wasn't. I doubt W95 is any better. When writing Windoze programs for
> W3.11, the programmer constantly has to be aware that it is up to
> her to maintain the illusion of multi-tasking by never allowing a
> thread to block, or even to spend too much time in a loop. GTK programmers
> never have to worry about such things.
Ain't it nice?
> Spend too long in a thread in W3.11, and the event stack overflows (!) and
> all the most recent events get dropped on the floor. You don't get
> told about this, but the user finds that several of his last key-clicks
> don't get through!
I personally find the message handling in Windows (even 95) rather
crude. I much like the use of callbacks, like in the GTK.
> Then there's the disasterous memory allocation techniques to worry about,
> though possibly if GTK were to concentrate only on supporting 32-bit
> programming, some of that might go away. Does W95 make any use of the
> memory-management on the [345]86 chip? W3.11 used to have this concept
> of "thunks" that you had to manipulate pretty much by hand - I never did get
> my head around it. Basically, it's all a recipe for "blue screen of
> death". MS themselves evidently never understood it, judging by how often
> MS Word and other such masterpieces suffer wipeouts.
I haven't explored the memory management of Win95 enough to see how it
deals with things. As far as I know, it probably still does the double
indirection, or memory handles or something along those lines. Windows
programming, I have found, it still rather clumsy and confusing. The GTK
is very streamlined in terms of its programming interface in comparison.
Have you ever compared a "Hello, World" program in native Windows to the
same kind of program in GTK? On a similar note, I recently compared a
simple ping interface in CORBA IDL, about 5 or 6 lines, and an equivalent
one for DCOM/ActiveX, and the DCOM ODL was over 25 lines! And that's
only the interface definition! I have never found M$ programming to ever
be developer friendly, the complete opposite of the Unix world.
Brett W. McCoy
http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
"The Number of UNIX installations has grown to 10, with more expected."
-- The UNIX Programmer's Manual, 2nd Edition, June, 1972
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]