News for hackers. Stuff that matters.
Re:Tiny fern has the largest genome of any organism on Earth by layla5alive on Saturday June 08, 2024 @03:00PM (#40619541)
This is like template metaprogramming :)

You're confusing the difference between macros and functions, only functions fully avoid duplication (except when they are inlined!)

Macros are expanded into text by the preprocessor. Templates are expanded by the compiler instead.

Re:Tiny fern has the largest genome of any organism on Earth by kevindamm on Saturday June 08, 2024 @05:52PM (#40620415)
Real macros (lisp-style not C-style) are more like template metaprogramming, too. It's not clear which source language GP comment is referring to.
Re:Tiny fern has the largest genome of any organism on Earth by ngcc_hk on Sunday June 09, 2024 @09:45AM (#40624395)
Actually c++ later seems to evolve a similar way : see part 2 of 4 of this series : https://deque.blog/2017/05/09/lisp-meta-programming-for-c-de...