version vs. static if
Jonathan M Davis
jmdavisProg at gmx.com
Fri Sep 23 13:09:55 PDT 2011
On Friday, September 23, 2011 12:59:20 Walter Bright wrote:
> On 9/23/2011 7:35 AM, Trass3r wrote:
> > Which again raises the question why we have version at all.
>
> They're meant for a more global view of generating different versions from
> the same source code.
Not to mention that version blocks be affected by compiler flags (unlike static
if).
Probably the thing that I like most about them though is that It's much nicer
to split out OS differences with explicit version blocks than having them be
just another set static ifs.
Yes, we technically _could_ get rid of version and do it all with static ifs,
but it wouldn't be as clean IMHO.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list