Re: default parameter value
From: Karl Heinz Buchegger (kbuchegg_at_gascad.at)
Date: 11/04/03
- Next message: Ivan Vecerina: "Re: c++ memory optimization"
- Previous message: Karl Heinz Buchegger: "Re: default parameter value"
- In reply to: lilburne: "Re: default parameter value"
- Next in thread: Karl Heinz Buchegger: "Re: default parameter value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 04 Nov 2003 09:42:05 +0100
lilburne wrote:
>
>
> When default arguments creep into our programs it is usually
> because someone is retrofitting a flag to the API of some
> method, and they can't be bothered to fix up all the places
> that the API change requires. In other words they are
> hacking (perjorative sense).
Even in this cases I prefer to add the missing arguments
on the callers side. The compiler will flag all code spots
where a call is done. Since it is possible to give a default
value, it is also possible to insert that very same defaut
value on the callers side. But it has the nice benefit of
looking at each call and doing a quick search in the callers
code, if the default is really apropriete. It happend more then
once that I figured out in less then 30 seconds that it was not :-)
-- Karl Heinz Buchegger kbuchegg@gascad.at
- Next message: Ivan Vecerina: "Re: c++ memory optimization"
- Previous message: Karl Heinz Buchegger: "Re: default parameter value"
- In reply to: lilburne: "Re: default parameter value"
- Next in thread: Karl Heinz Buchegger: "Re: default parameter value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|