Re: Intentional Programming?
Posted: Nov 4, 2006 12:09 PM
> I've been thinking about top down design and divide and
> conquer and I realised that if you just recursively break
> down functions or classes you'll eventually end up with no
The final step of top-down approach happens when you cannot divide further; there teh level of abstraction is the one of the language yo use.
> High level functionality will depend directly
> on low level functionality all the way to the bottom.
It seems to be a universal to me, at least from the point of view of a general top-down analysis (animals depends on cells that depends on proteins that depends on atoms etc.).
If by studying the properties of it's components you cannot explain the properties of the object you're studying, you probably miss something.
This approach does use abstraction in a way. By just stating at each stage how a task is performed and on what lower-level functionnality it relies, you do abstract, at each level, the lower levels.
> How does this fit with what you're talking about? When do
> you refactor to introduce abstractions?
The only refactoring activy you may have to do is to factor out similar functionnality that may appear separately in different "branches" of the decomposition, nothing more. The program is normally already well factored by design, so there's no point in inserting extra abstractions that are obviously not required by the program.