On 10/25/2013 8:59 PM, Zenaan Harkness wrote:
On 8/29/13, Jerry Stuckle <jstuc...@attglobal.net> wrote:

Please show how you can do inheritance and polymorphism in C.

Not so good finish. Looking at the above, we could say "use an
old/original preprocessor"? Or do that preprocessors work by hand?


Then you should easily be able to show how you can do inheritance and polymorphism in C.

And why
do you need to leave the basic operators out?  They are inherent to both
languages.

You have to use #include skillfully, and you have to explicitly put
function pointers in structures. It kind of turns things upside down,
a bit, and a little inside-out. It'll make even seasoned C programmers
seasick. And the syntax is not as flexible as C++.


Again, please show how to do inheritance and polymorphism in C.

As above ...


Still can't do it?

Which is all why C++ was written as a separate language.

But it can be done.

Once again, please show how to do inheritance and polymorphism in C.

Next you'll be saying you can't do functional or modular programming
in machine code...


Don't put words in my mouth.

By the way, mathematically speaking, objects are machines.

Maybe mathematically speaking, but we're talking programming here.  In
programming, variables have state.  Functions have behavior.  Objects
have both state and behavior.

Mathematically, we make ... declarations or assertions :)

0A This byte of ram we shall call a variable.
0B This byte of ram we shall call a pointer.
0C This byte of ram shall be the program start instruction.

It is not only reasonable, but useful to some people learning, to say
that "a programming object ... is like a machine".

So let me "fix" the statement:
"Mathematically speaking, objects are machines; programmatically
speaking, objects are like machines."

That wasn't so hard was it?

Lets be flexible in our understanding of each other, when doing so
causes no problem,
Zenaan



No, objects are not "machines" or "like machines". A ball is an object. Would you call it a "machine"? How about a can of dog food?

But both are objects, and can be emulated in OO programming.

Jerry


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/526b1b46.2040...@attglobal.net

Reply via email to