From Jason Turner
Watch on YouTube

Summary

This episode explores the differences between function overloading in C and C++. Jason demonstrates how C++ naturally supports function overloading through name mangling in the symbol table, while traditional C doesn't allow multiple functions with the same name. He shows how C traditionally handled this limitation by using distinct function names (like area, areaF, areaL) and then introduces C11's _Generic keyword, which provides a preprocessor-based approach to function overloading. The episode concludes by contrasting this with C++'s more elegant template-based solution.

Resources

Tags