Killing the comma operator

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Wed May 11 03:21:52 PDT 2016


On 11.05.2016 11:39, ZombineDev wrote:
>
> By "parametric polymorphism" do you mean multiple dispatch/multimethods?

It's a type system feature. It allows one uniform implementation to work 
on different types without a loss of type information (i.e., by using a 
variant, or up-casting to a less specific type). Templates are often 
used to solve similar problems, but they give you different 
implementations if you ask for different types, which does not work for 
delegates and function pointers (including virtual functions), if you 
need to recurse with changing type arguments, etc.

'inout' is a very restricted form of this.

I don't think this is on the same level as tuple support though.



More information about the Digitalmars-d mailing list