www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/27/06:17:11

From: ramuneAT AT topedatad DOT com
Newsgroups: comp.os.msdos.djgpp,comp.lang.c
Subject: Re: Functions in struct's... possible? How?
Date: 23 Aug 1997 18:05:20 GMT
Organization: None
Lines: 57
Sender: ramuneAT AT topedatad DOT com
Message-ID: <5tn8p0$em5@news1.ni.net>
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> <5tmcai$nuo$1 AT news DOT sendit DOT nodak DOT edu>
NNTP-Posting-Host: s24-cs1-alhambra.datadepot.com
Originator: espresso@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <5tmcai$nuo$1 AT news DOT sendit DOT nodak DOT edu>,
Adam W Lee <adalee AT sendit DOT sendit DOT nodak DOT edu> wrote:
>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.)

Well, if you program poorly, that's understandable. :)

>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
                                                     ^^^^^^^^
Oooo! The /BUZZWORD!!!/.  Who was it that said any programmer that used the
word "paradigm" without needing it ought to be taken out into the streets
and slapped around?  (Well, not quite, but I'm not as violent as that
person :)

>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

Idiots... you mean, like OS programmers? :)

>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.

I'll remember that the next time I'm working on my kernel.  OOP!  Yup, that's
the way.  Let's overload printk() and kmalloc()... ^_^

>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.

Why not learn C++ the way I did?  Down load the draft of the standard and
play with g++. :)

Why did I post?  Obviously, I'm bored. :)

-DN

- Raw text -


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