Re: Strategic Functional Migration and Multiple Inheritance

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Shawnk <Shawnk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In answer to some of your excellent points..

I'll only answer a few of your answers, again due to time I'm afraid.

I'm afraid I really don't see the relation between the two - it's like
claiming that object orientation is fundamentally linked to Turing
machines, IMO.

In a non-single CPU design an argument (against MI, etc) can be
made by saying each class would have its own processor. The
intent (of the statement) was to focus the context (of MI use)
and re-enforce the 'scientific metric' point about physical phenomena
in the context of a 'Turing machine'.

That seems like a very odd analogy, I'm afraid - I can't see how it
provides any benefit.

I found your analogy a bit arrogant -

Cringe. Those who don't know me tend to see that while those that do
see me as having a casual 'matter of fact' attitude coupled with a
strong passion for truth, justice and the American way :-)
(... I just could not resist. PS. American way is to question
your superiors .. in this case Anders' approach to language expression
in C#).

A matter of fact attitude is fine when we're talking about matters of
fact. I'm often viewed as arrogant on those issues as well - issues
where one can point to a spec and *prove* correctness. This is a matter
of *opinion* however, which is very different.

For what it's worth, my main beef with MI is that however you choose to
solve the "diamond of death", you've added complexity.

I qualified the 'diamond of death' issue as an 'under the cover' issue to
decouple (for these posts and thread) what the compiler generates from what
the programmer writes.

As I've said elsewhere, it's *not* an implementation issue. The effect
would have to be covered by the language specification.

Complexity being measured (a la information theory) as a simple character
count of the MI/SI expression alternatives.

I have to say, I think that's a very silly way of measuring complexity.
Would C# be a "simpler" language by making all the keywords single
letters? I don't believe so. It *certainly* wouldn't be a more readable
language.

The complexity I'm talking about is how hard it is to think about the
object model, and I believe that MI makes the model more potentially
complicated.

Whenever you make code harder to read, the upside has to be big. Considering
two or more base classes *is* a more complex situation, naturally making the
thought processes harder, IMO.
...
And I would normally favour composition/aggregation in such cases,
rather than repeated code.

This is exactly what I was searching for in this thread. A clear
concise and focused articulation of the conceptual comparison of
MI and proposed alternatives. (From someone who I respect :-)

[1] Composition
[2] Aggregation

In [2], functional agregation can be accomplished via MI or by embedding a
class
within a class. Both (MI, embedding) are agregation mechanisms. To clarify
your meaning - Did you mean - for example ...-

In creating a functional unit (class) Fu (in C#) that needs functionality from
classes Fx, Fy, Fz (three classes) you would inherit from either Fx, Fy or Fz
and embed the other two classes?

No. I would implement Ix, Iy and Iz by delegating each of the
implementations to an instance of each of Fx, Fy and Fz. Those
instances may be created by the class or specified externally (giving
flexibility). When writing Java in Eclipse, this is even supported very
simply by the IDE itself. It would be nice if there was a way of
expressing it in the language itself, but that wouldn't be equivalent
to MI.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Im confused: Turing machine model vs. interactivity
    ... explains how interactivity like this fits in with all the Turing ... Some people have argued that process algebras, ... for computing than Turing or von Neumann machines, ... language or vice versa, ...
    (comp.theory)
  • Berlinski paper presented 1985 at Applied systems analysis
    ... Complexity, Language and Life: Mathematical Approaches, ... This paper explores the idea that life comprises a language-like ...
    (talk.origins)
  • Re: Programmers unpaid overtime.
    ... The cache solution's execution time formula is a function of the total ... The campaign is part of what I consider the deprivation of language by ... You can't, in other words, document, and management wonders why ... >> complexity with a few benchmarks. ...
    (comp.programming)
  • Re: Kolmogorov complexity and logical languages
    ... I have looked into the Kolmogorov thingie a bit. ... it is hard to say that one language is more complex than another. ... with linguistics. ... instead of the more abstract notion of complexity. ...
    (sci.lang)
  • Re: LSP and subtype
    ... > Only if one defines software as a Turing program. ... What is the class of problems solvable using UML? ... the language of physics cannot describe. ... > multiple responsibilities; ...
    (comp.object)