One D Annoyance: Conflicting UFCS and opDispatch


I love D's UFCS. I find D's opDispatch questionable (particularly in comparison to opIndex(string)). Unfortunately, opDispatch takes precedence over UFCS (And does so silently, annoyingly enough).

The consequence is UFCS cannot be used on most data structures that employ opDispatch. At least not without modifying the data structure's opDispatch itself - which defeats much of UFCS's point of adding "member" functions to a data structure without actually modifying the data structure itself.

I hate that. And it makes me hate opDispatch, too.

Leave a comment

Captcha