digitalmars.D.learn - why cant function parameters be grouped by type ?
Hi, while variable declarations work in list:uint a,b,c;function parameters declarations don't:void foo(uint a,b,c);Because of this, function declarations are sometimes super-wide. (despite of the fact that: http://www.brainyquote.com/quotes/quotes/a/alanperlis177279.html) In the previous example, we could imagine that once a type defined, it'd valid until a new one appears (until a "redefinition" / an "override"). Is there anything in the grammar that prevents this syntax ? Thx.
Apr 12 2015
On Sunday, 12 April 2015 at 11:49:19 UTC, Baz wrote:Hi, while variable declarations work in list:void foo(int a, b); Is `b` a second int argument, or is there a user defined type named `b` and the second argument is nameless of type `b`?uint a,b,c;function parameters declarations don't:void foo(uint a,b,c);Because of this, function declarations are sometimes super-wide. (despite of the fact that: http://www.brainyquote.com/quotes/quotes/a/alanperlis177279.html) In the previous example, we could imagine that once a type defined, it'd valid until a new one appears (until a "redefinition" / an "override"). Is there anything in the grammar that prevents this syntax ? Thx.
Apr 12 2015
On Sun, 12 Apr 2015 11:49:18 +0000, Baz wrote:Is there anything in the grammar that prevents this syntax ?yes: nameless args. i would like to see 'em burned with napalm, but it=20 seems to be too late to do that...=
Apr 12 2015