Get the latest tech news

Arenas and the almighty concatenation operator


ullprogram.com/blog/2024/05/25/ I continue to streamline an arena-based paradigm, and stumbled upon a concise technique for dynamic growth — an efficient, generic “concatenate anything to anything” within an arena built atop a core of 9-ish lines of code. The key insight originated from a reader suggestion about dynamic arrays.

I continue to streamline an arena-based paradigm, and stumbled upon a concise technique for dynamic growth — an efficient, generic “concatenate anything to anything” within an arena built atop a core of 9-ish lines of code. The char array constructor normally kicks in in these situations, but compilers can’t resolve the template without an explicit str object. Unfortunately cap is a curve ball that the core template can’t handle, requiring a slightly more complex definition.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Arenas

Arenas