kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #10148
Re: Miscellaneous stuff
On 04/28/2013 11:58 PM, Lorenzo Marcantonio wrote:
> On Sun, Apr 28, 2013 at 11:40:07PM -0500, Dick Hollenbeck wrote:
>> Client code is simply that which makes calls to an interface, a class user.
>>
>> I don't see a problem if an interface is richer than its clients need.
>
> Since you changed the specifications (an angle can be arbitrary) the
> client needs to know it too. It's called type contravariance.
>
> Example:
> Client uses int, interface was using int. Interface now uses doubles.
>
> - Client get an angle from an object and stores it (incorrectly) in an
> int. Could be useful.
> - Client take that angle (which is now truncated) and gives in to
> another object (which expects a double). Perfectly fine.
>
> *However* data was lost in the process. And in C that's a perfectly
> legal thing to do (some compiler warns, I don't think gcc does)
>
> So you have to check clients, too.
Bullshit. just call the interface with the right argument.
Just tell us where this is not working, rather than some long winded academic horseshit.
Better yet, file a bug report.
Follow ups
References