|
From: Robert Martin on 31 Jan 2008 17:53 On 2007-12-07 13:29:27 -0600, ram(a)zedat.fu-berlin.de (Stefan Ram) said: > What is object-oriented programming? Writing programs in terms of data structures that are manipulated by functions that are called through jump tables inside those data structures. > > What is an object-oriented programming language? A language that automatically builds the data structures and jump tables and disguises jump table lookup as regular function calls. OO languages often allow similar data structures to share similar parts of their jump tables. > What is the main advantage of an object-oriented programming language? Managing interdependencies between modules. > Can you give a small example programm that shows something > that can be done in an object-oriented programming language, > but is not possible in a purely procedural programming language? In an OO language execution can flow directly from module A to module B without the source code of module A mentioning module B, and without the explicit use of a jump table or pointer to function. -- Robert C. Martin (Uncle Bob)��| email: unclebob(a)objectmentor.com Object Mentor Inc.� � � � � ��| blog:��www.butunclebob.com The Agile Transition Experts��| web:���www.objectmentor.com 800-338-6716� � � � � � � � ��|
From: Robert Martin on 31 Jan 2008 17:57 On 2007-12-10 13:26:15 -0600, "Daniel T." <daniel_t(a)earthlink.net> said: > AFAIK, you cannot store procedure/function pointers in Pascal or > Fortran. Are they not turing complete? In both languages you can write a simulator for a machine that has pointers to functions. -- Robert C. Martin (Uncle Bob)��| email: unclebob(a)objectmentor.com Object Mentor Inc.� � � � � ��| blog:��www.butunclebob.com The Agile Transition Experts��| web:���www.objectmentor.com 800-338-6716� � � � � � � � ��|
From: topmind on 31 Jan 2008 18:31 On Jan 30, 2:53 pm, Robert Martin <uncle...(a)objectmentor.com> wrote: > On 2007-12-07 13:29:27 -0600, r...(a)zedat.fu-berlin.de (Stefan Ram) said: > > > What is object-oriented programming? > > Writing programs in terms of data structures that are manipulated by > functions that are called through jump tables inside those data > structures. > > > > > What is an object-oriented programming language? > > A language that automatically builds the data structures and jump > tables and disguises jump table lookup as regular function calls. OO > languages often allow similar data structures to share similar parts of > their jump tables. Another way to say more or less the same thing is that OO uses maps (a kind of datastructure) as its primary building block, and these map cells can store values (attributes), references to other maps, or programming code (methods). With some syntactical sugar to simplify this map usage. Although I disagree with many views of Robert Martin, his definition of OOP is the most accurate of known OO authors, in my opinion. ("Jump table" is a bit anachronistic, and thus confusing IMO, so I use "map" instead.) > > > What is the main advantage of an object-oriented programming language? > > Managing interdependencies between modules. Not proven in practice outside of systems software. > Robert C. Martin (Uncle Bob) | email: uncle...(a)objectmentor.com -T-
|
Pages: 1 Prev: Am I "Overqualified"? Next: Testing Code (Re: too much OOP ?) |