[Libosinfo] [PATCHv4 08/11] Use OS-specific config in OsinfoInstallScript
Christophe Fergeau
cfergeau at redhat.com
Tue Dec 18 16:19:31 UTC 2012
On Tue, Dec 18, 2012 at 04:45:15PM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Dec 18, 2012 at 12:05 PM, Christophe Fergeau
> <cfergeau at redhat.com> wrote:
> > Yup, I've thought of both, we can also do if (config == entity) {}, but I
> > preferred to go the explicit way since the caller knows what it wants us to
> > do.
>
> Caller knows what it is passing and callee has easy ways to find out
> the type so why would you need this extra parameter? You are not
> making anything more explicit either in the caller or callee
> functions. Sorry but this just looks very clumsy.
Callee has an easy way to _guess_ how it was called by harcoding checks for
something that is true the way the code is _now_, this assumption could
easily break with some future changes. I'm fine with changing to a runtime
type check, but I don't see this as an improvement, just clumsy in a
different way.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20121218/05a48316/attachment.sig>
More information about the Libosinfo
mailing list