Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove virtual keyword #3337

Closed
wants to merge 1 commit into from
Closed

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Feb 26, 2014

I don't think it is really necessary. Adding new keyword is always sensible, so we should think more better way (eg. default(virtual): default(final):, etc)

@yebblies
Copy link
Member

so we should think more better way

Meh. I disagree.

Also, do not revert changes by commenting out code like this.

@ghost
Copy link

ghost commented Feb 26, 2014

Adding new keyword is always sensible

Not in this case. The meaning of virtual has been known for decades, adding completely new syntax makes no sense.

@9rnsr 9rnsr closed this Feb 26, 2014
@9rnsr 9rnsr deleted the revert_virtual_keyword branch March 7, 2014 09:41
@andralex
Copy link
Member

We're converging on final(false).

@IgorStepanov
Copy link
Contributor

We're converging on final(false).

May be we should introduce uniform syntax for cancelling attributes (including UDA). I suggest to use @!sym notation for do this. E.G.

class Foo
{
final:
    // my final methods
@!final:
    // my virtual methods
@MyUDA:
    // symbols with MyUDA attribute
@!MyUDA: 
    // symbols without MyUDA attribute.
}

Same for @safe/@!safe, nothrow/@!nothrow and the other ones.

@mihails-strasuns
Copy link

For UDA's it does not make sense because they don't have any semantics of their own and user code can implement anything it wants.

For @safe there already exist @system. @nothrow is only one missing counter-part I think.

@ibuclaw
Copy link
Member

ibuclaw commented Mar 16, 2014

May be we should introduce uniform syntax for cancelling attributes (including UDA). I suggest to use @!sym notation for do this. E.G.

No

@andralex
Copy link
Member

@IgorStepanov the point there was that you can pass any compile-time computable Boolean, so the approach generalizes well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants