Re: why cant function parameters be grouped by type ?
On Sun, 12 Apr 2015 11:49:18 +, 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 seems to be too late to do that... signature.asc Description: PGP signature
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.
Re: why cant function parameters be grouped by type ?
On Sunday, 12 April 2015 at 11:49:19 UTC, Baz wrote: 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. 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`?