On Wednesday, 29 August 2018 at 22:18:09 UTC, Everlast wrote:
If you take 100 non-programmers(say, mathematicians) and ask
them what is the natural extension of allowing an arbitrary
number of parameters knowing that A is a type and [] means
array and ... means an arbitrary number of, they will NOT think
A[]... makes sense.
A mathematician wouldn't see much difference between different
types of sequences. D supports the mathematical notion of a
sequence of duck typed objects in the form of variadic templates:
void f(A...)(A args){...}