On Tue, Feb 11, 2014 at 10:28 PM, Stefan Karpinski <[email protected]>wrote:

>

We could also just make the @windows macro evaluate to true or false
> appropriately and make sure that the compiler is clever enough to eliminate
> conditionals where the condition is a compile-time boolean value.
>

To clarify, then you could just write these things like this:

if @windows
  # windows-specific code
else
  # non-windows code
end


Unfortunately, you can't write @windows ? a : b in this scheme because of
the way the macro parser works, but we could actually change the @windows,
et al. macros to be zero-argument and simultaneously change macro parsing
so that a ? right after the macro doesn't get interpreted as a symbol and
then we could make this change in a backwards compatible way.

Reply via email to