git » homepage.git » master » tree

[master] / archive / forums / hacker-news / raw / items / 8924227.json

{"by":"brandonbloom","id":8924227,"kids":[8924337],"parent":8924093,"text":"Let me rephrase &quot;just hack it&quot;: Feature expressions are a low-level primitive for platform switching. If you have cross platform abstractions, consumers of your code shouldn&#x27;t need to use feature expressions. However, they are very useful in the implementation of such abstractions.<p>As for the programability complaint: I just don&#x27;t see why it is important. If you are generating code, you can already add&#x2F;remove content from the generated code. That is: you can always just write a &quot;feature macro&quot;! Feature expressions don&#x27;t add any power you don&#x27;t already have: Only affordances for humans.<p>Unrelated thought: Haskell&#x2F;GHC uses the C preprocessor to address this problem.","time":1421861634,"type":"comment"}