December 08, 2014
Walter Bright:

> I have some ideas, but don't particularly like any of them. But I don't want to bias things, so what ideas do you guys have?

In this thread I have seen lot of discussion about the location of const for struct/class methods, and I agree this is an interesting topic, but one of the most important points of this thread regarding DIP69 scope grammar seems too much ignored, that is the syntax used implementing DIP69 needs to be easy to read, understand, and remember. Overloading keywords meanings rarely helps make code easy to understand. Often if you use a different keyword for a different meaning your language is more easy to understand.

Double keywords like "auto ref", "scope ref", "final switch" and more cause some troubles, and I don't like them. I prefer keywords like "auto_ref", "scope_ref", "final_switch", etc.

Bye,
bearophile
December 09, 2014
On Mon, 08 Dec 2014 20:42:48 +0000
deadalnix via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> If consistency is a measure, the proposal is a winner.
ah, it seems to me that consistency never had high priority.


December 09, 2014
On Mon, 08 Dec 2014 23:15:25 +0000
bearophile via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> Walter Bright:
> 
> > I have some ideas, but don't particularly like any of them. But I don't want to bias things, so what ideas do you guys have?
> 
> In this thread I have seen lot of discussion about the location of const for struct/class methods, and I agree this is an interesting topic, but one of the most important points of this thread regarding DIP69 scope grammar seems too much ignored, that is the syntax used implementing DIP69 needs to be easy to read, understand, and remember. Overloading keywords meanings rarely helps make code easy to understand. Often if you use a different keyword for a different meaning your language is more easy to understand.
> 
> Double keywords like "auto ref", "scope ref", "final switch" and more cause some troubles, and I don't like them. I prefer keywords like "auto_ref", "scope_ref", "final_switch", etc.

oh, please, no! what's wrong with double keywords? ah, except that
`shared static this()` is ok and `static shared this()` is not ok, and
it has no sane explanation...


December 09, 2014
On 8 December 2014 at 19:45, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> I thought I could make this work, but it's a problem. There are two meanings for scope when attached to a function:
>
>     T func() scope;   // the 'this' pointer is 'scope'
>     scope T func();   // the function returns a 'scope' T
>
> I have some ideas, but don't particularly like any of them. But I don't want to bias things, so what ideas do you guys have?

The solution is obvious; function should return scope(T)

;)
1 2 3
Next ›   Last »