common controls updown patch

David Elliott dfe at tgwbd.org
Sat Jan 19 12:21:33 CST 2002


On 2002.01.19 04:37 Shane Shields wrote:
> On Saturday 19 January 2002 12:23, you wrote:
> > to realize that almost no other programming language does things like
> > BASIC.
> 
> you got that right!
> 
> > Might I suggest Python if you are in the process of learning
> programming.
> 
> isnt programming a never ending learning experience?
> 
Oh yeah it is. :-)

> > Python is an extremely elegant language, interfaces well with C code,
> and
> 
> at the moment i am really concentrating on C. most of my C experience is
> with
> STL which again forces a different mind set. but once i clean my mind of
> misconceptions then i can really start doing things ;-)
> 
Don't forget, C++ and C are two different languages no matter how much all 
the marketing suggests that they aren't.  They are close, but not quite 
the same.  Wine is all C code with no C++ code.  There have been several 
times when I wished Alexandre would accept C++ code into the source tree.  
The Windows API is fairly heavily object oriented with a C interface.  
Sometimes it would seem to make sense to actually use an OO language to do 
the OO programming.  But in reality C can be easily coaxed into an OO 
programming style even though it is a functional language.

As for Python... well, I'd really suggest taking a look at it.  I was of 
the mindset that C and C++ were so great why bother with anything else.  
Then earlier last year I took a look at Python and was absolutely amazed.  
Looking at python code will help you out with the core concepts of 
programming in any lanuage.  That specifically includes C and C++.  Python 
just lends itself to good programming style.  Of course any bad progrmamer 
can still write a bad program in it though.

> > has several GUI toolkits.  I think the default toolkit is Tk (yuk) but
> 
> what do you think of QT (KDE's gui)
> 
Well, I have mixed feelings about it.  I dislike the fact that you must 
run all of your code through the MOC to compile it.  My understanding of 
this is that it is done so that the event system can pass pointers to the 
various objects around.  I think wxWindows has a by far more elegant event 
system.  For ease of programming along with power I don't think you can 
beat wxWindows.

wxWindows also has a non-STL but still typesafe implementation of lists 
and arrays!  Basically all you have to do is declare that you're going to 
need a list or array that holds items of "SomeType" and you give it a name 
such as "SomeTypeList" (can be called anything though).  I am thoroughly 
impressed with the thought that has gone into this toolkit.  Plus writing 
to it means you get Windows, Linux, and Mac (mac support is beta) for 
free.  This was an instant sell for my boss, which made me happy because I 
really didn't feel like screwing with the beast that is MFC.

As for some of the other toolkits.  GTK is nice and they did a really good 
job hacking OO code into C, a non-OO language.  Supposedly this helps them 
because it makes it easier to do language bindings.  Maybe when they 
started, yes.  If I were to write GTK today I would do it in C++.  GNU C++ 
has come a long way and GCC 3.0.3 is a very nice compiler.  I am using 
linux-cross-mingw32 GCC 3.0.3 along with wxWindows to write a GUI app for 
work and it has been going great.  The only gripe I have is that GCC takes 
a very long time to compile what is fairly minimal C++ code.  This is on 
an Athlon 1.4 Ghz machine!  I have watched the GCC2.96 from RH compile C 
code on the same machine faster than I can figure out what the hell its 
compiling.  Took like 10 minutes to build the GCC3.0.3 cross compiler with 
it after I spent much longer than that fixing the bugs in the GCC3.0.3 
source.

> > The general form is booleanexpression?then:else
> 
> things like that would never occur to the basic mind (there are two forms
> of
> basic mind if you think about it) ;-)
> 
Yeah, I tripped over that one many a time.  Eventually I started using it 
frequently because in many cases it makes the code so much more readable.  
And with C++ it's almost a requirement that you use it sometimes.

> > > To drink the WINE of success you must first seek the
> > > sayings of source.
> >
> > hehe.. how true.  Do you know the author of that quote?  We should put
> it
> > on the webpage.
> 
> yes i know the author...........and its me! :-) If you want you can put
> it on
> the web page (cool!)
> 
hehe.. thought so, I just wondered if it was a paraphrase of some other 
more well known quote.

Anyway... this is getting to be offtopic and this message barely has 
anything to do with Wine, so if you reply and it doesn't have anything at 
all to do with Wine, please send directly.

-Dave




More information about the wine-devel mailing list