What is the reasoning behind the lack of conversions when passing parameters

Paul Backus snarwin at gmail.com
Wed Feb 14 19:53:14 UTC 2024


On Wednesday, 14 February 2024 at 19:30:36 UTC, Walter Bright 
wrote:
> The usual way to do an Any type is to:
>
> 1. use Object as the common ancestor
>
> 2. use iUnknown as the common ancestor with QueryInterface
>
> 3. use void*
>
> 4. dmd internally uses its own RootObject for Any
>
> 5. use templates with a generic type T

The way Phobos currently does it is (essentially) by storing a 
void* and a TypeInfo internally.


More information about the Digitalmars-d mailing list