4 ms·
That's quite similar to how Go does it (Go would have something like hello_platform.c), which in my opinion works quite well. I actually find it to be one of th
by logicchains 10y ago
That's quite similar to how Go does it (Go would have something like hello_platform.c), which in my opinion works quite well. I actually find it to be one of the nicest things about Go, compared even to Haskell, which for some bizarre reason uses the C preprocessor (!!) to pepper code with #ifdefs.
- ycmbntrthrwaway 10y agoGo took this idea from Plan 9. In fact, Go shares a lot with Plan 9 C compiler structure. Related: http://doc.cat-v.org/henry_spencer/ifdef_considered_harmful http://doc.cat-v.org/henry_spencer/ifdef_considered_harmful
- Keyframe 10y agoInteresting! I never went in-depth into Go, apart from spending an afternoon with it to have a go at it.
- marcosdumay 10y ago> for some bizarre reason uses the C preprocessor (!!) to pepper code with #ifdefs. I always thought that was funny. You are using the most powerful (of the widely used) language available for transforming text, but must fall back to the C preprocessor.