Re: What's the easiest and/or simplest part of Linux Kernel?
- To: debian-user@lists.debian.org
- Subject: Re: What's the easiest and/or simplest part of Linux Kernel?
- From: Zenaan Harkness <zen@freedbms.net>
- Date: Sat, 26 Oct 2013 11:59:15 +1100
- Message-id: <[🔎] CAOsGNSQpQbrXeBfUS=s10ZwwbChDpN2EbcXcaxkLizHA34-s4A@mail.gmail.com>
- In-reply-to: <521F3550.1000803@attglobal.net>
- References: <ba2eb585-666b-4a48-a2b7-60731d0a7149@googlegroups.com> <CAEfyLFD5OTxBbb0o+2WCFmgOMmx7=VoCtJa7XkEN95xWNDC2eg@mail.gmail.com> <CAOsGNSQpLN0rHwnNxTxwzHHk=HiyvnR_095AmnqqGcktCgzokw@mail.gmail.com> <8f144eac-b29e-413b-a03d-fb70fb2da811@googlegroups.com> <bbc075cf10dfd18f4c8d80fa00481438@neutralite.org> <c6905c42-aac9-4d94-9375-91a22fae68c9@googlegroups.com> <521CB29C.30605@attglobal.net> <lLs82-32p-29@gated-at.bofh.it> <eedb0c45-c793-4186-b19b-cee1de595731@googlegroups.com> <CAAr43iPuJ2q853i7gtZtxcjcO7mDOOw3dCaer-hSQ9=jCwbZmg@mail.gmail.com> <99c77733-812c-4e5b-b008-e8d3592cd58f@googlegroups.com> <eef863b1434a4ded43faecc5ae89ecfb@neutralite.org> <521E6259.2050507@attglobal.net> <c6d4a56e719bb75a9794fd74a9757e4d@neutralite.org> <521EBD4A.40401@attglobal.net> <CAAr43iMy8NP6a0kVQgZ0QJVOV4K=t-0kbtgxbtsAXpUQJKeVqQ@mail.gmail.com> <521F3550.1000803@attglobal.net>
On 8/29/13, Jerry Stuckle <jstuckle@attglobal.net> wrote:
> On 8/29/2013 12:45 AM, Joel Rees wrote:
>> (I really don't have time to do this.)
>>
>> On Thu, Aug 29, 2013 at 12:17 PM,
>>> [Somebody replied to somebody, arguing that C can't do objects.]
>>
>> The syntax does become obtuse, unfun, cluttered, etc., but it can be
>> done.
>>
>
> I didn't say C can't do objects. I said it can't do Object Oriented
> Programming. Two entirely different things.
>
>> (To get the neurons connecting, think about early objective-C, when
>> the "object" stuff was done with a special purpose pre-processor.
>>
>> Shoot. Don't forget that C++ itself was once a pre-processor for C.)
>
> That's like saying C is a preprocessor for assembler. Sure, the
> original C++ tools were preprocessors. However, they were preprocessors
> which provided the tools necessary to do OOP.
Good start.
>> Admittedly, the "object" syntax becomes a separate syntax and language
>> from the C part when you do OOP in unadorned C. You have to leave the
>> basic operators (+-*/%, etc.) out of the object-oriented language and
>> syntax. (Which is part of the reason it becomes unfun.)
>>
>
> 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?
> 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 ...
>> 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...
>> 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
Reply to: