wrap/unwrap vs Go-style duck typing
Dicebot
public at dicebot.lv
Tue Oct 29 04:46:32 PDT 2013
On Friday, 25 October 2013 at 05:45:53 UTC, Andrei Alexandrescu
wrote:
> Hello,
>
> I was curious how our fledgling wrap and unwrap routines
> compare with Go's duck typing - similarities, distinctions,
> performance. Please share any thoughts, thanks!
>
> Andrei
It may have been really good if it worked with structs and could
have been decently optimized away by compiler. Right now though
similar built-in language implementation in Rust (I don't know
how it is in go but assume similarity) is totally superior. Key
point of this feature for me is being able to adapt existing
non-polymorphic duck-typed aggregates (structs) to some external
polymorphic binary interfaces. `wrap` does not seem to help here.
More information about the Digitalmars-d
mailing list