The Cookbook should (as it says) emphasize modern solutions. I wouldn't call the solution
modern because it loops through a list effectively built at runtime, preventing compiler optimizations. A "modern" solution would use modern macros. :) Or a hardcoded cond expression where the compiler can inline the primitives.
An independent question: What is a compelling use case for the procedure?
The Cookbook should (as it says) emphasize modern solutions. I wouldn't call the solution
cookbook/recipes/get-type-of-object.md
Line 30 in 76456bc
modern because it loops through a list effectively built at runtime, preventing compiler optimizations. A "modern" solution would use modern macros. :) Or a hardcoded
condexpression where the compiler can inline the primitives.An independent question: What is a compelling use case for the procedure?