[haiku-commits] Re: haiku: hrev45604 - src/kits/interface headers/os/interface

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 03 May 2013 19:15:42 +0200

On 2013-05-03 at 18:49:41 [+0200], John Scipione <jscipione@xxxxxxxxx> 
wrote:
> I disagree, for something like BRect it's overkill, odds are that will
> be included, but what about something more exotic like BShape or
> BEntry? Those might be included only by happenstance. You use them,
> the compiler doesn't complain so you go about your day. Then later on
> somebody comes along and changes things and then BOutlineListView all
> of a sudden breaks even thought they were touching a complete
> unrelated class. Where do you draw the line? For me it's simple,
> declare what you use and everything works, don't, and you roll the
> dice.

We draw the line at "just include what's required to compile". Our build 
system is not make, jam is able to detect that one of the headers you 
include has changed, and it will recompile your file. Thus, there is no 
problem if someone does a change in one of the headers you include.

It would be more annoying with something that doesn't include headers in 
the dependencies. There would be a risk of not noticing the change. But 
even in that case, if you changed a class to the point of removing some of 
the other classes it references in its API, you really should have a look 
at all the subclasses/users to make sure you didn't break anything for 
them. So, these extra declarations are of no help.

-- 
Adrien.

Other related posts: