On 1/13/21 8:17 AM, Marcone wrote:

> import std;
>
> void a(int b){
> }
>
> void main()
> {
>    Variant c = 10;
>    a(c); // Error
> }
>
> Need more sugar.

That can't work in a strongly statically typed language. The call a(c) is decided at compile time but Variant is not an int at compile time.

It could only work if Variant were a user-defined type that had an automatic conversion to int with 'alias this'.

Ali

Reply via email to