From: harrison@lclark.edu (Mark Harrison)
Newsgroups: comp.lang.c
Subject: Re: main()
Date: 3 Sep 92 20:12:15 GMT
Article-I.D.: lclark.1992Sep3.201215.20494
Organization: Lewis & Clark College, Portland OR

In article <1992Sep3.191208.8039@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
>In article <1383@uknet.ac.uk> tlg@uknet.ac.uk (Tim.Goodwin) writes:
>>
>>It seems that the readers of this group are interested in C, as defined by
>>the ANSI/ISO standard, and not in other languages which happen to look
>>like C (as, for example, the language which your compiler compiles).
>>
>>There are some, perhaps, who are overkeen to correct those who do not share
>>this fascination with the standard.  But they are not trying to "score a
>>point off you", merely attempting to disseminate accurate information.
>
>There is a reason the folks here are so keen on coding in standard
>conforming ways. Most of us have had the experience of having to
>port code that "obviously would never be ported" and have learned
>the hard way the value of sticking by the rules. Or we have had
>to maintain code that was written to the particular idiosyncrasies
>of a given compiler and had to keep using that same crufty old compiler
>even though the company that wrote the compiler went out of business.
>
>So sure, if your code is so hardware dependent that you know you 
>will never switch platforms, code however you want. But you are
>locking yourself into the exact platform and development tools
>you are using now. And this decision might start to look foolish
>4 or 5 years down the road.
>

All right.  Here's the scoop.  I am making a DOS GUI.  I would have got
one from ftp, but I want to know how it works, be able to easily modify
it, and not have to mess around with comerical/shareware/freeware.  So I
got this book _Object-Oriented Programming with Turbo C++_ by Keith
Weiskamp, Loren Heiny, and Bryan Flamig.  Sounds completly nuts, but I
typed in the code.  It was a good introduction to C++, I have the full
source, and a text that explains everything (well most everything.)  By
the time I got it all working, I had a good understanding of how such a
system works (GUI), what the code did, and how to modify it to my own
liking.

Step Two.  It's written completly in C++, so it's easy to make any
modifications I desire.  For instance, I hate the way they implemented
menus, scroll bars, etc.  Now that I understand everything I am changing
what I don't like.  When I am done with that (about another days work on
that), I would like to build an application with it.  For my own personal
use.  If I like it, and it works good, I may eventually do
a shareware/freeware thing.  But I think that C++ might not cut it.  Works
good at home, but here at work on a 386SX I can already see some slowing.

Step Three.  I would like to take what I've learned and re-write it in C
or C/Assembly. (The GUI that is.)  I would make it as portable as
possible.  The code now is a little hardware dependant, but that can't be
helped with this type of thing.

If I ever went through this on another machine, I would not do it all
myself again.  I just wanted a good learning experience, so I jumped in
feet first.  That's why I said I would never port it to another machine
(or at least not the C++ version.)  I don't think Borland will go out of
business in the near future, but if they do, my code is pretty much DOS
portable.  So it would just be minor changes.  So I am not Locking myself
into anything that I will regret in 4 or 5 years (as far as I can see.) 
The only thing that I might be tempted to do, it use a 32-bit DOS
extender.  Then, yes.  I'm in deep trouble.  But that can't be helped. 
But the code I have would port fairly well I think.  So it would not be a
disaster.

Sorry about the long post, but I'm tired of getting messages saying that
I'll be sorry for not following standards.


-- 
=============================================================================
Mark Harrison           |  "We are the Priests, of the Temples of Syrinx
harrison@sun.lclark.edu |   Our great computers fill the hallowed halls."
              -- Me     |                                    -- Rush