Search code examples
naming-conventionscore-animation

Weird function names in Quartz Core: what gives?


Out of curiosity, what may the rationale behind these function names (found in Apple's Quartz Core framework) be?

  • ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv()
  • ZNK2CA6Render9Animation9next_timeEdRd()
  • ZN2CA11GenericRectIiE5insetEii()

Do you think the developers somehow encoded argument types in function names? How do you find yourself putting "EP19" in there in the course of day-to-day coding? In what circumstances do such barely readable function names actually help you read code and otherwise be more productive?

Thanks in advance for any hints, and Merry Christmas!


Solution

  • These 'mangled' names are automatically generated by the C++ compiler and indeed encode type information.