|
|
Up |
|
|
  |
Author: Jonah ThomasJonah Thomas Date: Mar 27, 2008 15:11
I've consistently avoided OO. I've tried to avoid problems that are
complicated enough for OO to be valuable.
But various recent clf posts have given me the idea that these days,
avoiding OO is like avoiding structured programming. You can maintain
software adequately without formal structuring, but there's no point
trying to get anybody to believe you.
So I did a quick lit search, and came to some obvious conclusions that
don't seem to match the conventional wisdom. It looks like OO aids
programming by organizing code. When you act on an object you don't have
to remember what data type you're accessing. The object tells you, or
better yet it makes sure it links up to the right datatype without
telling you what happened. And if you try to give it the wrong datatype
then almost certainly you have made a mistake, because if another OO
routine has produced the wrong type then it wasn't producing something
intended for this object to interact with. If the two were designed to
fit together they'd actually match up. So instead of doing a conversion,
it's better for the system to tell you about your probable logic error.
|
| Show full article (5.17Kb) |
|
| | 35 Comments |
|
  |
Author: Bruce McFarlingBruce McFarling Date: Mar 27, 2008 18:58
On Mar 27, 6:11 pm, Jonah Thomas gmail.com> wrote:
> *You need methods to work around the benefits your objects give you.*
> *You need methods to flexibly handle extreme complexity.*
> *You need methods to reduce the expense of all this OO complexity.*
But from what I dimly recall, from the stance of an outside observer
since before OO programming took the microcomputer file by storm, the
original object programming patterns were not distilled from
experience in working with OO languages. The original object
programming patterns were distilled from experience in working with
problems that fit object oriented programming so much better than
structural procedural programming that people were programming in an
object oriented style in structural procedural languages.
Remember that Graphical User Interfaces were forcing applications to
respond to users as if they were composed of a variety of objects of
different types. Doing that by building a collection of artificial
objects is a very direct way to go about it.
|
| |
|
| | no comments |
|
  |
Author: John PassanitiJohn Passaniti Date: Mar 27, 2008 23:14
On Mar 27, 6:11 pm, Jonah Thomas gmail.com> wrote:
> So I did a quick lit search, and came to some obvious conclusions that
> don't seem to match the conventional wisdom. It looks like OO aids
> programming by organizing code. When you act on an object you don't have
> to remember what data type you're accessing.
I've been saying this in comp.lang.forth for years: Object
orientation is nothing more than a way to organize data and the code
that operates on it. It isn't always appropriate, but far more often
than not, it makes sense (or is at least a good model to start with).
The problem usually comes from people who have been exposed to an
object oriented language (say, C++) and think that because that
language has a particular model for objects, that all object
orientation is like that. They see classes, and think that object
orientation means classes. Nope. They might look at how a specific
implementation does polymorphic dispatch, and thinks that is the only
way it is done. Nope.
|
| Show full article (4.93Kb) |
| no comments |
|
  |
Author: GerryGerry Date: Mar 28, 2008 03:40
On 28 Mar, 06:14, John Passaniti gmail.com> wrote:
> On Mar 27, 6:11 pm, Jonah Thomas gmail.com> wrote:
>
>> So I did a quick lit search, and came to some obvious conclusions that
>> don't seem to match the conventional wisdom. It looks like OO aids
>> programming by organizing code. When you act on an object you don't have
>> to remember what data type you're accessing.
>
> I've been saying this in comp.lang.forth for years: Object
> orientation is nothing more than a way to organize data and the code
> that operates on it. It isn't always appropriate, but far more often
> than not, it makes sense (or is at least a good model to start with).
>
> The problem usually comes from people who have been exposed to an
> object oriented language (say, C++) and think that because that
> language has a particular model for objects, that all object
> orientation is like that. They see classes, and think that object
> orientation means classes. Nope. They might look at how a specific
> implementation does polymorphic dispatch, and thinks that is the only
> way it is done. Nope. ...
|
| Show full article (7.40Kb) |
| no comments |
|
  |
Author: Jonah ThomasJonah Thomas Date: Mar 28, 2008 04:11
John Passaniti gmail.com> wrote:
> Jonah Thomas gmail.com> wrote:
>> So I did a quick lit search, and came to some obvious conclusions
>> that don't seem to match the conventional wisdom. It looks like OO
>> aids programming by organizing code. When you act on an object you
>> don't have to remember what data type you're accessing.
>
> I've been saying this in comp.lang.forth for years: Object
> orientation is nothing more than a way to organize data and the code
> that operates on it. It isn't always appropriate, but far more often
> than not, it makes sense (or is at least a good model to start with).
Sure. I'd guess that when you try to do something complicated there's
usually *some* OO approach that would be quite helpful. The real skill
is to see which way to do it. Make some fundamental mistake and you wind
up with something that's worse than useless, but that might not show how
bad it is at the start.
[Snip reasonable suggestion to actually learn and practice many forms of
OO before criticising it]
|
| Show full article (9.09Kb) |
| no comments |
|
  |
Author: Albert van der HorstAlbert van der Horst Date: Mar 28, 2008 03:59
>On Mar 27, 6:11 pm, Jonah Thomas gmail.com> wrote:
>
>> But as the design patterns show, the whole thing has been bogged down in
>> complexity.
>
>Sorry, but you got it completely backward. Some design patterns are
>themselves complex in terms of description, but often when you see the
>code, it becomes obvious what the benefits are. This isn't
>immediately apparent to novices in design patterns, but that shouldn't
>be surprising. Novices to Forth don't often grok the language until
>later.
|
| Show full article (5.72Kb) |
| no comments |
|
  |
Author: Jonah ThomasJonah Thomas Date: Mar 28, 2008 05:32
Albert van der Horst wrote:
> John Passaniti gmail.com> wrote:
>>On Mar 27, 6:11 pm, Jonah Thomas gmail.com> wrote:
>
>>
>>> But as the design patterns show, the whole thing has been bogged
>>down in> complexity.
>>
>>Sorry, but you got it completely backward. Some design patterns are
>>themselves complex in terms of description, but often when you see
>>the code, it becomes obvious what the benefits are. This isn't
>>immediately apparent to novices in design patterns, but that
>>shouldn't be surprising. Novices to Forth don't often grok the
>>language until later.
>
> I was a novice with regards to design patterns. I tried to read the
> book and fell asleep (time and again). It is just a very elaborate
> way to make explicit the tricks, I already used all the time.
> Reading the book doesn't help to use a trick, I would come up with
> in a new situation. ...
|
| Show full article (5.76Kb) |
| 1 Comment |
|
  |
Author: Bernd PaysanBernd Paysan Date: Mar 28, 2008 06:18
Jonah Thomas wrote:
> Sure. Your advice is good but it doesn't fit my needs. Let's try a
> similar discussion in a different context. I don't like quantum
> mechanics because by all accounts it does not make sense. People can
> solve problems with it but they get no sense of what's possible from it,
> and experienced QM users tend to have no useful intuition about problems
> they have not yet formally solved. In some contexts it looks like a dead
> end. And by some accounts it is sort of invalid, some of the results
> come from things like fudge factors and taking the first few terms of
> series that aren't sure to converge and so on. I don't like it but I
> don't have much to do with it. If I were to go onto a physics newsgroup
> and say I don't like it because it doesn't make sense and I want
> something that will get similar answers that does make sense, I expect
> I'd get a response that's very similar to yours. "Before you criticise
> QM, you need to learn all about QM. Learn all the math. Learn how to
> solve QM problems, and solve a lot of significant problems, not just
> simple textbook examples. Only then will you be qualified to discuss the
> issues with it." But I wouldn't want to do that. Probably I have only
> around 30 productive years left. Should I spend, say, 15 of them
> learning all about something that I have every reason to think will not ...
|
| Show full article (3.07Kb) |
| no comments |
|
  |
Author: Bruce McFarlingBruce McFarling Date: Mar 28, 2008 08:40
On Mar 28, 6:59 am, Albert van der Horst
wrote:
> I was a novice with regards to design patterns. I tried to read the
> book and fell asleep (time and again). It is just a very elaborate
> way to make explicit the tricks, I already used all the time.
It is, IOW, a design language. Its for pointing to what you are
doing when what you happen to be doing happens to be object
oriented programming, and happen to be talking to someone else
who talks in the design language, and saying to someone else,
"I'm using a bridge here, between an interpreter method and a
compiler method.
> Reading the book doesn't help to use a trick, ...
That's not unusual in design languages. Its not uncommon for the
design process to proceed without using the design language,
especially if its a design process where excessive verbal reasoning
interferes with the efficiency of the design process, so talking about
the design is simply a categorically different kind of process than
designing itself.
|
| Show full article (2.98Kb) |
| no comments |
|
  |
|
|
  |
Author: Bruce McFarlingBruce McFarling Date: Mar 28, 2008 09:02
On Mar 28, 8:32 am, Jonah Thomas gmail.com> wrote:
> One of the early promises of OO was that great designers could set up OO
> systems that mediocre coders could then use, and the coders would find
> things arranged so simply that they wouldn't make mistakes. This promise
> has failed, probably inevitably. Instead we sometimes get mediocre
> designers making OO systems that get in the way for good programmers who
> come after them. Of course this is not exactly a flaw in OO, it's a
> misuse of OO. But the marketing promise that OO would be hard to misuse
> has failed.
And then you change the article from "a" or "one" OO marketing claim
to "the" OO marketing claim.
> I don't fully agree with my own OO-bashing. I think the time has come
> that a new marketing gimmick can replace the OO marketing gimmick, and I
> wonder what it will be like, and I fall into that sort of language when
> I think in those terms. OO methodology is OK, most of us use it when
> it's clearly useful. OO formal methods are OK, they can be useful in
> specific circumstances. OO marketing has run its course.
|
| Show full article (3.13Kb) |
| no comments |
|
RELATED THREADS |
  |
|
|
|
|
|