Re: Separation of concerns




throatslasher wrote:
On Mar 29, 11:13 am, "topmind" <topm...@xxxxxxxxxxxxxxxx> wrote:
Daniel T. wrote:
"Thomas Kowalski" <t...@xxxxxx> wrote:

It means to keep variables, functions, objects, abstractions as
focused as possible.

And how do you trade off with cohesion?

There is no trade off. Separating concerns means that an abstraction
should do no more than one thing, cohesion means that an abstraction
should do no less than one thing.

That is a precedural-oriented definition because objects are not
necessarily about tasks and task divisions.

-T-

You're so emotionally invested in proving the inferiority of OO that
you are incapable of parsing a simple message without prejudice. You
read the verb "do" and you extrapolate some crazy meaning from the
guy's post. An object that simply holds data still "does" something,
and that has nothing to do with tasks nor procedual programming, so
your post is absurd.

Why would someone treat programming styles like sports teams? Who are
these weird people who actually waste their time pumping up their pet
programming languages or styles and putting down others'?

No, objects *as generally described* are NOT units of "do-ness" (for
lack of a better term). Objects are generally considered as little
state machines that carry behaviors (note plural) related to
themselves. An Employee object may have Hire, Fire, giveRaise, Pay,
Describe, etc. methods. Thus, Employee objects are an "abstraction
that does more than one thing", violating your rule it appears.
Sometimes they are also described as "units of responsibility", not
units of task. I did NOT invent these common interpretation of
objects.

If there is an alternative interpretation of "do...thing", then may I
request more precise wording.

-T-

.



Relevant Pages

  • Re: object system...
    ... for that you need machine language. ... But the price of abstraction is performance. ... involves the function call overhead, the cost of copying the structs around on the stack, much less efficiently crafted ASM output (since the compiler may lack most of the context from the caller), ... ... But because of the 3GL type system compromises the way one must do that is with a different mindset towards design, not OOPL programming. ...
    (comp.object)
  • Re: object system...
    ... for that you need machine language. ... isn't even as fast as other systems programming languages. ... Stroustrup's stated design goal was to enable ... all manner of elegance or abstraction can be sacrificed for speed, ...
    (comp.object)
  • Re: OT: concrete and clay WAS: Re: I need a new compiler...
    ... oriented *design* over object oriented programming. ... It seemed to me you were missing the abstraction of a virtual machne, ... He has become an accomplished pilot on the simulator and I was very ...
    (comp.lang.cobol)
  • Re: Anybody here endure C/Cpp? (.h to .inc conversion)
    ... On 2005-01-11, Beth wrote: ... which gear you're in somehow with respect to the transmission of the car. ... The car is a great example of abstraction because frankly, ... have /ever/ done any OS programming you would know that the kernel is designed ...
    (alt.lang.asm)
  • Re: newbie question
    ... I don't have a problem with the concept of abstraction itself.. ... > It's all about the programming stack. ... productivity. ...
    (microsoft.public.dotnet.framework.aspnet)