Hacker Newsnew | past | comments | ask | show | jobs | submit | joe_loser's commentslogin

Yeah, plus the if branches are runtime-checks instead of the if-constexpr approach


There is about the same amount of runtime checks. In the auto-lambda+constexpr case the switch/if-cascade is inside visit and it is required to dispatch the correct type to the visitor.


The book "Engineering a Compiler" (https://www.amazon.com/Engineering-Compiler-Second-Keith-Coo...) is a good resource and reference; I keep it on my desk at work. Like other compiler books, it falls short in meeting all practical application purposes and does great with theory. Ideally, this book should be combined with looking at modern compiler implementations.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: