Shane Hathaway wrote:
Dieter Maurer wrote:

Jim Fulton wrote at 2006-3-14 07:23 -0500:

- Indirection and abstraction are inherently bad because they
 hide things. :)
 (This is a corolary of "explicit is better than implicit".)



I do not agree with this (but I also do not agree with
"explicit is better tham implicit" -- almost all activities
would become drastically more difficult if they could only be
done explicitly: walking, driving, eating, ... I am very happy
that most things, in real life and in programming work implicitly
and on an appropriate abstract level).


+1. When I learn a skill, it is at first completely explicit, and as the skill becomes predictable and reliable, it gradually becomes implicit. If I kept everything explicit, I would hinder myself from building higher level skills.

So explicit is better than implicit until a sufficiently tight abstraction comes about. Take memory management: yesterday it was explicit (malloc/free); today it's mostly implicit (garbage collection). Garbage collection is both an abstraction, since programmers no longer manage memory directly, and an indirection, since programmers now use APIs that call malloc and free. We all agree GC is good, so explicit is definitely not always better than implicit.

Thanks for explaining "Explicit is better than implicit,
except when it's not."

To say something is bad only because it's implicit or abstract is a poor argument, but to say something is bad because it's a leaky abstraction is an argument that can be explored further.

That's not what I was refering to.

> For example, it's not very
sensible to say implicit acquisition is bad because it's implicit, but it is quite sensible to say it's bad because it leaks all attributes and forces a lot of code to be aware of wrappers.

All abstractions have their dark side.  Things can have strengths and 
weaknesses.

I stand by my argument that indirection and abstraction are bad.  Of course, 
they
are often also good.  They should be used when the good significantly
outweighs the bad.

Too often though, people don't realize that indirection and abstraction have
an inherent cost and use them when the benefit doesn't outweigh the cost.

Jim

--
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to