Re: An illuminating experiment using platform().
- Posted by CChris Jul 13, 2008
- 806 views
Shawn Pringle said...
CChris said...
Hmm right.
This changes my earlier statement to:
- platform() has no advantages over ifdef, so it could be deprecated or dropped;
- there is an even stronger case for a deferred_ifdef statement, which would cause code selection at execution time, whether translated or shrouded, and not at initial parse time.
CChris
What is the semantic difference then betweeen deferred_ifdef and if?
Shawn
if checks at run time which branch to take. deferred_ifdef parses all options at parse time. Only the one which is valid on the target machibe gets its IL to the bacjend.
In addition, other defines might be taken in account by deferred_ifdef, while platform() is limite d in scope.
CChris