lkml.org 
[lkml]   [2003]   [Jun]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 18 Jun 2003 05:18:11 +0100
From viro@parcelfa ...
SubjectRe: Flaw in the driver-model implementation of attributes
On Tue, Jun 17, 2003 at 08:44:50PM -0700, Perez-Gonzalez, Inaky wrote:

> Maybe this is going to kill my argument as an analogy, but think
> about a C++ class hierarchy, where belonging to a class means
> to inherit that class' methods. When an object is instantiated
> and its class inherits a lot of other classes, it inherits all
> the methods of those classes. Your methods are the attrs, and
> you can access them with the same pointer, you don't  need to
> look somewhere else ...

But there is no inheritance here.  Block device and IDE disk are
different objects and relation is not "A is B with <...>", it's
"among other things, A happens to use B in a way <...>".  
Moreover, there is no such thing as "physical device of that block device".
There might be many.  There might be none.  IOW, we have a bunch of
constructors for class "block device" and some of them happen to have
some kinds of physical devices among their arguments.  That's it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:36    [from the cache]
©2003-2008