
Ask HN: Coding with?overlays? - quizotic
I&#x27;m a C++ dinosaur who uses emacs and git. I&#x27;m wondering whether you know of a different language, or an IDE, or an SCM or anything else that might support a notion of coding with &quot;overlays&quot;.<p>What&#x27;s an overlay? It&#x27;s code that might be needed in a particular context, but not always. One member of my team adds annoying printf statements and repetitive assertions as debugging aids to code for which he is primarily responsible. I&#x27;d love to see his code without all the cruft. I&#x27;m frequently guilty of ignoring YAGNI, and leaving in &quot;future&quot; code that&#x27;s #ifdef&#x27;d out. Nobody but me should have to look at that. We&#x27;ve all added code for integrating with various external systems, be it Windows vs Linux, or postgres vs mysql; but maybe I only want to see the Linux code, without all the Windows stuff.<p>It might even be nice to have overlays for various levels of commenting - so I could add comments for my own understanding of someone&#x27;s code without inflicting them on everyone.<p>I imagine a system where I could check boxes: include debugging overlay, for linux, for postgres, with my personal comments ... when I need that. Or just the core code.<p>Have you ever seen anything like this?
======
stevekemp
The only close thing to that which I've used is "feature flags". I could
imagine a feature-flag for PSQL, debugging output, etc. But not for "linux" vs
"openbsd".

------
itamarst
1\. Search for "aspect-oriented programming".

2\. [http://akkartik.name/post/wart-layers](http://akkartik.name/post/wart-
layers)

