|
Prev: Proxy pattern: remote chat proxy and interfaces
Next: Derived class calling overriden base class methods
From: Patrick May on 13 Jan 2008 21:18 "Daniel T." <daniel_t(a)earthlink.net> writes: > Patrick May <pjm(a)spe.com> wrote: >> ram(a)zedat.fu-berlin.de (Stefan Ram) writes: > >> > A good procedural language should support or enforce >> > >> > * a powerful static type system, yet one that helps >> > to detect many possible errors >> >> So only statically typed languages are good? > > And down the road we once again go. :-) Yeah, I felt a little dirty writing it. Regards, Patrick ------------------------------------------------------------------------ S P Engineering, Inc. | Large scale, mission-critical, distributed OO | systems design and implementation. pjm(a)spe.com | (C++, Java, Common Lisp, Jini, middleware, SOA)
From: Patrick May on 13 Jan 2008 21:32 ram(a)zedat.fu-berlin.de (Stefan Ram) writes: > Patrick May <pjm(a)spe.com> writes: >>So only statically typed languages are good? > > Support for dynamic types, according to me�, is the defining > property of an object-oriented language. So I would not deem a > language with support for dynamic types a purely procedural > language any more. That's an interesting definition, but it seems to fail to distinguish reliably between procedural, OO, and functional languages. Any can support static or dynamic typing (or a combination). > 1) > My own definitions are as follows: > > What is object-oriented programming? > > Object-oriented programming uses objects (storage > entities) annotated with run-time types: Every object > carries information about its type, which implies > information about the layout and encoding of its storage. > > What is an object-oriented programming language? > > An object-oriented programming language supports > object-oriented programming, but it usually hides the type > information of objects and automatically assigns > operations specified for a type to each object. Thus, in > an object oriented programming language, the programmer > does not read the type information himself nor does he use > it to select an appropriate action. Instead he just states > the action by a "verb" with a type and the programing > language will then make sure, that the correct > implementation is called for any given object at run-time. > This is called �run-time polymorphism� or �late binding�. > Individual object-oriented programming languages might > include additional support for object-oriented programing, > but this binding is the core feature of every > object-oriented programming language. This definition excludes C++ and Java, at least, from the set of OO languages, unless dynamic casts are used in C++ or reflection is used in Java. Regards, Patrick ------------------------------------------------------------------------ S P Engineering, Inc. | Large scale, mission-critical, distributed OO | systems design and implementation. pjm(a)spe.com | (C++, Java, Common Lisp, Jini, middleware, SOA)
From: AndyW on 14 Jan 2008 01:09 On Sat, 12 Jan 2008 17:55:50 -0800 (PST), topmind <topmind(a)technologist.com> wrote: > > >Daniel T. wrote: >> alexcpn <alexcpn(a)gmail.com> wrote: >> >> > Maybe I should frame the question more clearly- what is it so special >> > in OO that makes it so successfully industrially. I really don't >> > 'believe' that it is because of the way OO entity help us in closely >> > modeling real life etc >> >> Here I must disagree. I think OO does help us to more closely model the >> real world. > >Note that a good many OO proponents disagree that OO is mostly about >"modeling the real world". Bertrand Meyer, for example, dismisses the >idea that modeling the real world is the key point of OO. Further, the >real world sometimes is not the ideal approach. We wouldn't want to >model a physical card catalog in a library, for example. We have >technology that transcends 3D card cabinets. Why be stuck in the 3D >world when a virtual world (indexing) can have gazillion dimensions? There are actually many different philosophies on how to approach OO. For example, I am what is called a purist, so I believe that an object has to be a tangible [real world] thing, with services and mixins used to deal with rule violations. Others think that if something has a name, its an object, yet others have even more esoteric rules. ---------------- AndyW, Mercenary Software Developer
From: Nick Keighley on 14 Jan 2008 08:37 On 13 Jan, 16:54, S Perryman <q...(a)q.com> wrote: > S Perryman wrote: > > Ignoring syntax issues ... compare C to its peers (Ada, Modula 2 etc) . > > 5. Bounds enforcement for enumerated type operations (incrementation etc) > 6. Bounds definition (non-zero lower/upper bounds etc) or enforcement for > array types. some would argue that C's low level nature ("portable assembler") does not require this sort of bound checking. If you want to you can check it yourself. I'd quite like a better enum. -- Nick keighley
From: Nick Keighley on 14 Jan 2008 08:42
On 13 Jan, 10:52, S Perryman <q...(a)q.com> wrote: > topmind wrote: > > alexcpn wrote: > >>Now a sudden thought stuck me. What if sometime in the future somebody > >>armed with concrete statistics come and tell me that OO is too > >>complicated and that most of the key words which we swear by like > >>inheritance, polymorphisms etc really do not provide much value to the > >>vast millions of OO code out there; I really believe part of this > >>since I know a little about the code in one of the largest OO code > >>base in the telecom network management product that I work in. > >>Maybe I should frame the question more clearly- what is it so special > >>in OO that makes it so successfully industrially. I really don't > >>'believe' that it is because of the way OO entity help us in closely > >>modeling real life etc > > Who says its successful? > > All of those people who have used it to implement systems at worst > as well as preceding paradigms, and at best much better. > > > Its one of those things that people pay lip- > > service to because they have been brainwashed into believing it is > > better for you, as if it was broccoli; yet there is no SCIENTIFIC > > EVIDENCE that OOP is better. NONE (at least for biz apps). > > I've challenged OO fans to prove it objectively better for custom biz > > apps for over a decade, and they CANNOT show it with source code. It > > always turns into my personal preference versus theirs, not some clear- > > cut quantity. I don't dispute that OO may model *some* people's brains > > better than others, but every brain is different. > > No. It "turns out" that the problems that your mythical "biz apps" have > to solve have no real need for OOP beyond the approaches you espouse. > > Nothing wrong with that. > > However, for many of the types of problem that others face (telecoms etc) , > the approaches you espouse have been shown to be badly wanting (note to > the reader : topmind does not like to discuss them because they are not > his mythical "biz apps" and he knows his flawed claims immediately die a > horrible death) . no! no! no! well informed people (eg topmind) know that telecoms programs are just really really big device drivers. And device drivers are well suited to OO programming. (my current device driver is about 500 kloc...) <snip> -- Nick Keighley |