Poll: Would you like to try const-by-default or not?
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Jun 11 07:24:16 PDT 2007
Bruno Medeiros wrote:
> Walter Bright wrote:
>> Bill Baxter wrote:
>>> * "having same type defaults is better for generics"
>>> (maybe...but I'm not convinced. If you have powerful enough
>>> metaprogramming it shouldn't be hard to strip const from a type
>>> tuple, or add it. And people do far more programming than
>>> meta-programming.)
>>
>> This is a good point. With const-by-default, you have function type
>> declarations behaving *fundamentally* different from other
>> declarations. Given the metaprogramming ability to use tuples to
>> declare parameters, doing function template type deduction for
>> parameters, and type inference on parameters, making this
>> fundamentally different may wind up really screwing things up.
>
> Will using tuples to declare function parameters allow us to declare
> ref/inout parameters?
>
Nevermind, seems you already confirmed that in another post:
> 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.
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list