On Wed, Oct 23, 2002 at 03:43:13PM +0200, Jean-Marc Lasgouttes wrote:
> Andre> Oh I really hate that guessing which combination of what magic
> Andre> codes should be used. Why isn't this knowledge put in the
> Andre> insets (aka "virtual function")?
> 
> like 
>   bool Inset::wantedAsASCIIInTOC() const;     
> ??
> 
> The problem is that this is really an ad-hoc solution. 

It is cleaner in a way I think. I know that we end up with a hundred
virtual functions if we do that on a regular base and I don't like that.
But it's the lesser evil. At least that's my believe...

> What could be done though is add a parameter to Inset::ascii telling
> what we want and let the inset do the right thing. 

I don't like the extra parameter more than the extra virtual function.
There are too many parameters already in some places (Windows API anyone?)
and nobody is going to weed them out. If there is a seperate function is
only used in a single place and the code there gets scrapped later in a
rework, chances are much higher that the functions will be removed than the
crytpic parameter...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to