cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/23/09:50:41

From: adalee AT sendit DOT sendit DOT nodak DOT edu (Adam W Lee)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c
Subject: Re: Functions in struct's... possible? How?
Followup-To: comp.os.msdos.djgpp,comp.lang.c
Date: 23 Aug 1997 09:59:46 GMT
Organization: SENDIT - North Dakota's Educational Network
Lines: 44
Message-ID: <5tmcai$nuo$1@news.sendit.nodak.edu>
References: <33FCDA5C DOT 2353659F AT execulink DOT com> <5tippg$ci7$2 AT news DOT sendit DOT nodak DOT edu> <5tkq9a$2se$1 AT helios DOT crest DOT nt DOT com>
NNTP-Posting-Host: sendit-2.sendit.nodak.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Kaz Kylheku (kaz AT helios DOT crest DOT nt DOT com) wrote:
: In article <5tippg$ci7$2 AT news DOT sendit DOT nodak DOT edu>,
: Adam W Lee <adalee AT sendit DOT sendit DOT nodak DOT edu> wrote:
: >If you want a function in a struct, you should just use C++ and use a
: >class to define this instead of a struct.

: clueless lamer...

I really appreciate your well thought out and obviously well-informed
reply.  Obviously, because I suggest the usage of C++ I'm a clueless
lamer...  It's a lot nicer to define a function in a class than have to
deal with all of those crappy pointers that are just begging for a bug
(and lead to hell while reading through code.)

A month or two I would've been on your side, attacking C++ as something
retarded.  I now, however, have recognized that the paradigm has shifted
and I should get with the times or in a few years I'll be one of the
idiots stuck behind writing C...  I mean, I hated C when I left BASIC, now
I'm starting to love C++ and Java...  OOP makes a lot of sense and saves a
lot of hassle...  You should check out some books on it and realize that
dealing with pointers to functions in structs etc is just not worth the
time.

Also, somebody said "you can do this in C, suggesting another language is
dumb" (I believe it was Paul Derbyshire but I may be mistaken, I'll have
to go back and look.)  To this I have to say: I could build a house out of
shoelaces and gum, but it'd be a lot easier to build and repair one out of
wood and nails.  Much the same way, this program could be written in ASM
for all I care... It, however, would make more sense to code it in C and
even more sense to code more OO style things like this in C++.

Oh if you're looking for some books and stuff:  if you're wondering what
the hell a paradigm is, read Kuhn...  If you want to get into C++ read
something like "Thinking in C++" or something to that effect.

--
  
  +--- --  --   -     -
  | [pHiXx/VorteX]
  : phixx AT usa DOT net

  :

  .

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019