2 ms·
And of course even the best possible functions introduce barriers to reading the code, which is often very expensive. They are both abstractions that substitut
by harperlee 6y ago
And of course even the best possible functions introduce barriers to reading the code, which is often very expensive.
They are both abstractions that substitute an explicit operation with just a name; and thus both require that you expand your vocabulary when holding the program context in your head. Abstract at the wrong level, and you increase difficulty; abstract at the correct one, and you lower it.
Where I do think the main problem with macros is, is in debugging - because I know no macro system that maintains metadata on the written code to help explain the higher (macro) conceptual level once a stacktrace / condition / segfault / error arises.
- taeric 6y agoAmusingly, cweb does maintain line numbers. My mind was best blown the first time I saw a step debugger work on cweb source. That said, with the proliferation of distributed systems that are commonly executing where you can't connect a debugger, I've found many aren't even aware of what they are missing. Jrebel, I recall, was very popular in some circles. Today, I'm not even sure most of my colleagues have ever used a debugger in a professional context.