On Tuesday 15 March 2005 17:14, Greg KH wrote:
> > Ease-of-use, maybe. However, it also means
> > ease-of-getting-reference-counting-wrong. And reference counting trumps it
> > all :)
> 
> It will not make the reference counting logic easier to get wrong, or
> easier to get right. �It totally takes it away from the user, and makes
> them implement it themselves if they so wish (like the USB HCD patch
> does.)

Exactly, _IF_ they wish. And as practice shows proper reference counting
is not the very first thing people are concerned about.

I see the the new class interface useful in the following scenario:

 - We have a proper subsystem that already does proper refcounting and
   one might not want to consolidate core reference counting with
   subsystems as it is too invasive.

If you consider the following scenario I do not think we want to
encourage it:

 - We have "bad" system and user says "ah, I'll just use the new model
   so I don't have to think about lifetime rules at the moment, I don't
   have time/have something more interesting to do/I'll do that later
   when I have time".

There is a third scenario:

 - We have a completely new system or a system undergoing overhaul: the
   coder tries to do it right and does consider all lifetime rules and
   makes sure that all objects are properly accounted for. In this case
   old interface is much more clear and easier to use than the new one.

I also not quite sure why a bus with its devices and drivers can be
implemented correctly (I believe we have a bunch of them now - PCI, USB,
serio, gameport) but class interface cannot be tamed?

-- 
Dmitry


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to