struct opCall - use cases

monkyyy crazymonkyyy at gmail.com
Fri Aug 8 19:46:53 UTC 2025


On Friday, 8 August 2025 at 14:11:48 UTC, Brother Bill wrote:
> What are some use cases where struct opCall would be useful?
> As far as I know, this capability is unique to D.  Do any other 
> languages support this?

Glue code, someone was fairly good about trying to hide all 
implementation details, contrary to popular belief, syntax sugar 
has syntactic meaning. 95% of the base cases of the fundamental 
syntax are "scary hidden control flow" escape hatches.

In the most exterme cases you can nest structs with opDispatch, 
opCall is fairly mild mannered bit of meta programming hacking.


More information about the Digitalmars-d-learn mailing list