Stepping back and looking at constness from another angle.

Walter Bright newshound1 at digitalmars.com
Wed Jun 6 22:20:41 PDT 2007


Derek Parnell wrote:
> On Wed, 06 Jun 2007 20:45:18 -0700, David B. Held wrote:
> 
> 
>>   Remember that function argument lists are type tuples.
> 
> No they're not. Sure, currently they look /like/ a tuple of types, but
> that's not what they actually are. This visual similarity is a side-effect
> of the current syntax.

Function argument lists are expression tuples, and function parameter 
lists are type tuples.

> A function argument list is a tuple of course, but each argument in the
> signature also identifies the passing mechanism and the access mechanism
> and not only the type.
> 
> Even in current D one cannot say that a function argument list such as
> "(inout int, out int, in int)" is a type tuple.

That's true, and it's one of the big motivators to support 'ref', as 
then it becomes possible to make the parameter list a type tuple.



More information about the Digitalmars-d mailing list