begin  quoting Doug Barton as of Sat, Jun 23, 2012 at 07:27:51PM -0700:
> On 06/23/2012 08:27, Alexey I. Froloff wrote:
> > Have you looked at the code?  I want to get rid of ifdef hell.
> 
> I hate to break this to you, but ifdef's are an unfortunate fact of life
> in a cross-platform world. Yes, they make life more difficult, but
> nobody said it would be easy.
[snip]

I was taught that excessive abuse of #ifdef is a sign of bad design
and undisciplined implementation.  I've never had a reason to dispute
that bit of philosophy.

> You could look at this as an opportunity to expand your coding skills,
> and improve your marketability. :)

Successfully eliminating the #ifdef hell while maintaining all existing
functionality (even on systems not directly available) would indeed be
a nice bullet on a resume:

[snip]
> If by "simplified" you mean "made to work on all the platforms that it
> works on now, with simpler code," that's great. If by "simplified" you
> mean "I'm going to rip out everything that doesn't matter to the
> platform I use" then once again, I'm opposed.

Yes. Avoid losing information or functionality needlessly.

Relegating it to a support module hidden behind a couple of function
calls is just fine. For purposes of code simplification, the performance
impact of indirecting through additonal abstraction layers is zero.

[chop]

-- 
SJS


-- 
To unsubscribe, send mail to [email protected].

Reply via email to