Re: [PATCH 04/40] Windows: Use the Windows style PATH separator ';'.
- From
Johannes Sixt <johannes.sixt@telecom.at>
- Date
- Feb 28, 2008, 20:43 UTC
- Message-ID
- <200802282143.19322.johannes.sixt@telecom.at>
- In-Reply-To
- <47C67E1A.5030304@gnu.org>
On Thursday 28 February 2008 10:25, Paolo Bonzini wrote:
Show 7 quoted lines
> > +#ifdef __MINGW32__ > > + strbuf_addch(out, ';'); > > +#else > > strbuf_addch(out, ':'); > > +#endif > > Why not adding a PATH_SEPARATOR #define?
Because IMO it is obfuscating:
1. When you read through the code and see PATH_SEPARATOR, you still have to go look how it's defined. Why? Because you always will ask: Is this about ':' vs. ';' or '/' vs. '\\'?
2. When you look for where ":" or ";" are treated, you'll end up at the #define. Then you need an extra step to search for PATH_SEPARATOR.
-- Hannes