> >Trygve alleges DCI makes code simper to read. This
> makes
> > code much harder to debug.
>
> I find it easier to debug because:
>
> 1.The context switches across business functions are fewer
> and more closely follow the mental model (role-based) than
> the programmer model (domain-based);
I am not sure this is proven. There is no direct comparison for me to understand your point clearly.
> 2. Inclusion polymorphism is almost completely gone. When
> I call foo I get foo: not one of many foos up and down the
> subtyping hierarchy.
I will agree that this is what most F# programmers hate about C# style languages.
> 3. I can find a test point for something of business
> value: that is, I can really do BDD. That makes it easier
> to develop test cases to support debugging.
Suppose I'm a robot and don't have as good of an imagination as I put on -- I burn my creativity at work. Explain this to me directly.
> 4. I do less run-time debugging because the code is more
> readable at compile time.
>
> I do not understand your claim of why it's harder to
> debug. Do you have a running example? Try debugging the
> examples in the book manuscript.
Trygve's BabyIDE and Christian's test harness aren't pluggable, event-driven models. Trygve hardcodes sequences of collaborations in his mediator pattern usage. Christian does as well.
Applications exist on multiple continuums, one of which is:
<-[vague]-----[core data structures]-----[detailed]->
An architectural pattern should say stuff about these things. And so should good API design. Unfortunately, most APIs assume you know all your targets at code-write-time. My challenge to Trygve is to make such code more readable. It is easy to do a news report and explain what happened. It is much tougher to write poetry.
It's my major complaint about MVC, too. People think *anything* in MVC can be a model, including a View. Clearer guidelines produce more robust designs than compiler features. Even though I hate DDD, this is the one reason it works so well!!!