const, final, scope function parameters

Walter Bright newshound1 at digitalmars.com
Sun May 27 12:23:20 PDT 2007


Dave wrote:
> Walter Bright wrote:
>> It looks like making "const final scope" be the default for function 
>> parameters is going to be infeasible. The troubles are that:
>>
>> 1) It seems to knock a lot of people for a loop, who will be assuming 
>> that an undecorated name would be like an undecorated name for a local 
>> or global variable.
>>
> 
> I can understand that concern, but who've you been bouncing the beta off 
> of ("It seems to knock people for a loop")?

C++ people. I regularly go to the nwcpp meetings, and we like to talk 
about D afterwards <g>. The nwcpp people are experienced C++ 
programmers, and a lot of them are opinion leaders (for example, a 
number of them have regular C++ articles and papers published).

> It seems that over in d.D.announce the response was the opposite (IIRC, 
> most were in favor of 'in' by default, at least to try with 2.0 to start 
> off with).
> 
> That said, I have a nagging suspicion you'd be right for the most likely 
> people to try D.

Yup. First impressions count, and C++ peoples' first impressions of that 
was just universally bad. After some explaining, they understood what 
was going on and the rationale, but still just thought the confusion 
just wasn't worth it.

BTW, the next D compiler will be an 'alpha' with this stuff in it, 
mainly to try these things out and see how they work in practice. If it 
just isn't going to work, we'll try and fix it.



More information about the Digitalmars-d mailing list