From the D Blog: (Ab)using Overload Sets to Create Ad-Hoc Template APIs

jmh530 john.michael.hall at gmail.com
Tue Jul 21 23:41:28 UTC 2026


On Sunday, 19 July 2026 at 16:11:34 UTC, Mike Parker wrote:
> A new blog post is up, this one from monkyyy. He digs into 
> combining overload sets and specialization mechanisms to create 
> template APIs that allow users to swap in their own 
> implementations.
>
> https://blog.dlang.org/2026/07/19/abusing-overload-sets-to-create-ad-hoc-template-apis/


A good read.

In the part about GVec, what if you already have code that relies 
on the library with GVec2/3/4 and want to integrate it with this?

Also you mention the ad hoc template API, but could you not also 
make a GVec as a single struct with static ifs.



More information about the Digitalmars-d-announce mailing list