C is fastest

Yanni Chiu yanni-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Oct 15 16:27:01 UTC 2009


Christopher Browne wrote:
> On Thu, Oct 15, 2009 at 2:02 AM, Yanni Chiu <yanni-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org> wrote:
>> ... OO was originally conceived of in Smalltalk ...
> 
> By the way, objects were introduced in Simula-67, predating Smalltalk
> by about 4 years.
> 
>   "The first version, known as Smalltalk-71, was created in a few
> mornings on a bet that a programming language based on the idea of
> message passing inspired by Simula could be implemented in "a page of
> code." -- Wikipedia on Smalltalk

Yes, Simula is one of the languages that gave the inventors inspiration. 
But the term "object-oriented programming" was coined by the the 
inventors of Smalltalk. -- Wikipedia on Alan Kay

So the quibble is "Objects come from Simula" vs. "object-oriented, i.e. 
OO, comes from Smalltalk".

> To my mind, OO is just a programming tool, and one that frequently
> *less* useful than other programming paradigms.
> 
> Wikipedia has a pretty good list of "programming paradigms":
> http://en.wikipedia.org/wiki/Programming_paradigm
> 
> OO doesn't quite even fit onto that list; it's not sufficiently
> coherently defined (witness that every language that comes along just
> about has another object model!)

I can see what you're getting at. I think there needs to be a 
distinction made between OOP and OOA -- OO-programming vs. OO-analysis. 
If you analyze your problem and come up with an object-oriented 
solution, where you determine relevant classes and their relationships 
and behaviours, then you have an OOA of your solution. You can implement 
that solution using any language, even C. You could define a C-struct 
for each analysis class, and use an argument passing and naming 
convention to connect loose C-functions to the structs.

However, if you target C++, then you can choose the class facilities 
provided by the C++ language.

So I agree, OO Analysis is just one of many approaches (paradigms) that 
can be used to formulate a solution. For some problems, OOA may be a 
poor fit, and in those cases, if you're forced to use and OOP (that was 
designed to make analysis objects easy to implement), then it may seem 
like the language is fighting against you.

-- 
Yanni
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list