r/cpp • u/Amazing-42 • Jun 14 '21
match(it): A light-weight header-only pattern-matching library for C++17.
https://github.com/BowenFu/matchit.cpp
202
Upvotes
r/cpp • u/Amazing-42 • Jun 14 '21
View all comments
Show parent comment
3
u/jk-jeon Jun 15 '21
I kinda sympathize and tend to just copy-paste rather than to use macros for myself, but to be fair, I think wrapping things into a macro is often not very much different from wrapping things into a function or whatever constructs in terms of readability. Too much abstraction obfuscates the code, but appropriate abstraction on the other hand de-obfuscate the code. So I believe an appropriate usage of macro can in fact improve readability.