On Tue, Nov 17, 2009 at 9:05 PM, Yigal Chripun <yigal...@gmail.com> wrote: > to clarify what I meant regarding function args list lets look at a few ML > examples: > > > fun f1() = () > f1 is unit -> unit > > fun f2 (a) = a > f2 `a -> `a > > fun f3 (a, b, (c, d)) = a + b + c + d > f3 is (`a, `a, (`a, `a)) -> `a > > it doesn't auto flatten the tuples but the list of parameters is equivalent > to a tuple.
Ok, but I think retard is right that tuple==parameter list equivalence is going to be hard to make happen in a language like D, since D has all these storage classes for parameters. > regarding unit type, it has by definition exactly one value, so a function > that is defined now in D to return "void" would return that value and than > it's perfectly legal to have foo(bar()) when bar returns a unit type. I see. That might come in handy sometimes. Thanks for explaining. But it seems like something we could make happen regardless of tuples. In C/C++ you can declare foo as void foo(void); It makes sense that a function returning void should be allowed to chain with a function taking void. --bb