Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 19 Jul 2012 03:56:32 -0500 Date: Thu, 19 Jul 2012 09:56:30 +0100 From: Lipska the Kat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.python Subject: Re: Encapsulation, inheritance and polymorphism References: <3vnfd9-343.ln1@satorlaser.homedns.org> <-8SdnVrXGqie25jNnZ2dnUVZ7qKdnZ2d@bt.com> <5005A103.9050802@stoneleaf.us> <5006b48a$0$29978$c3e8da3$5496439d@news.astraweb.com> <50076437$0$1756$c3e8da3$76491128@news.astraweb.com> <3d919437-80a8-424f-ae90-fb829434dba2@po9g2000pbb.googlegroups.com> In-Reply-To: <3d919437-80a8-424f-ae90-fb829434dba2@po9g2000pbb.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 92 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-JNziV3tvma5DJ+F52vybuFkVd2mWrlCJIywnjj0WLg80ESPuQvbtOLuYeVVwP9zyan6HodC2BAA/QUz!1KMGsQTo3llfbrBcEZmta/p8/fu/Dt7H1GwLQFqMyMWvdfS92dBky4jXgG6ZE9TX9VLo/A23Bis= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 5788 Xref: csiph.com comp.lang.python:25614 On 19/07/12 07:09, rusi wrote: > On Jul 19, 6:34 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> On Wed, 18 Jul 2012 15:40:00 +0100, Lipska the Kat wrote: >>> Object Oriented programming is all about encapsulating human concepts in >>> a way that makes sense to human beings. Make no mistake, it is NEVER the >>> case that a software system is written for any other reason than to >>> serve human beings. OO is more than just the mechanics of writing code, >>> it's a state of mind. >> >> Um, yes? > Its not so much a question of language as in programming as language > as in layman-speak. > One characteristic with our field is that we take ordinary words and > then distort them so much the original meaning is completely lost. > > Take 'computer' for example. For Turing a computer was a > mathematician doing a computation with a pen and paper. He then > showed how to de-skill the mathematician so much that a machine could > do what he was doing. In trying that he also hit upon the limits of > such 'de-skilling' -- human-computers routinely detect infinite loops, > whereas machine-computers can never do so (in full generality). > > Ironically the important lesson is lost and today 'computer' is > synonymous with machine. > > Here is Dijkstra on similar distortions with 'user' and > 'intelligent': > http://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD618.html > > 'Object' (and OO) are similar messes. Well this is all very interesting. The terminology is quite concise if you allow it to be Take "An Object is an instance of a Class" A Class describes a human concept (be it concrete like a 'Parrot' or more abstract like a 'Session') an Object is an actual representation of that concept that exists in the memory of a computer (what else should we call it). Objects don't exist in the mind of a human, concepts do. A class is a way of representing that concept so that other humans can understand it. That's it, really, there is no more, anything else is implementation. > In layman-speak and object is well, a thing. But we are not talking in 'layman-speak' we are discussing concepts that are familiar to us in the 'language of the domain' at least I though we were. Academic twiddling with the distorted meaning of words spun by vested interests is all very interesting I'm sure but doesn't really advance the discussion does it? > - subject to space-laws like can only exist at one place at a time, > there cannot be two objects at the same place and time etc. > - subject to time-laws like coming into existence at some time and > going out at some other > - connotes inanimateness unlike other 'creatures' or 'beings'. Well here I have to agree with you. Anyone who invents a 'Person' Class should be dismissed forthwith. Parrots are OK though. > When this metaphor works (for example as in guis and simulation) then > we have success-stories like smalltalk and simula. > > When it doesn't the success is poorer. eg a programmer writing math > software in/on a OO system may for example 'clone' a matrix. This may > be good science-fiction; its bad math. > > And one of the most pervasive (and stupidist) metaphors is the parent- > child relation of classes. > Just for the record, in the normal world 'creatures/beings' reproduce > and therefore inherit. But we are not talking about the 'real world' are we, we are talking about representing complex interacting human concepts in a way that can be understood by humans and translated into a form that can be executed on a binary machine > Objects dont. Well they do, it's a fact, you can call a method on a sub class that only exists in the super class. What else would you call it. Well it's been fun but I have bills to pay so I suppose I'd better do some work. TTFN -- Lipska the Kat: Troll hunter, Sandbox destroyer and Farscape dreamer of Aeryn Sun.