DbI checked integral
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 24 17:37:34 PDT 2016
On 6/24/2016 2:31 PM, Andrei Alexandrescu wrote:
> The core type is Checked!(int, Hook), where Hook is a type that may provide
> state and behavior. The behavior of interest is incarnated by the following
> methods (all of which are optional and introspected): hookOpCast, onBadCast,
> hookOpEquals, onBadOpEquals, hookOpCmp, onBadOpCmp, hookOpUnary, hookOpBinary,
> and onOverflow.
The use of Hook with introspection is an innovative and brilliant design pattern
that enables user extensibility and customization rather than trying to lump
every kitchen sink possibility into the core code.
More information about the Digitalmars-d
mailing list