Broken?

Namespace rswhite4 at googlemail.com
Wed Mar 12 15:21:35 PDT 2014


On Wednesday, 12 March 2014 at 21:38:03 UTC, Walter Bright wrote:
> On 3/11/2014 2:28 PM, Michel Fortin wrote:
>> class Foo
>> {
>> final:
>>     void bar();
>>     void baz();
>>
>> virtual:
>>     void crack();
>>     void crunch();
>>
>> final:
>>     void dodge();
>>     void damp();
>>     virtual void divert();
>>     void doh();
>> }
>
> class Foo
> {
>   final
>   {
>      void bar();
>      void baz();
>   }
>
>      void crack();
>      void crunch();
>
>   final
>   {
>      void dodge();
>      void damp();
>      void divert();
>      void doh();
>   }
> }

With that in mind you can also claim that @system <-> @safe and 
public <-> private are redundant.

Let us make public default and remove the public keyword:

----
class Foo {
	private {
		//private stuff #1
	}

	//public stuff

	private {
		//private stuff #1
	}
}
----

Same with @safe/@system ;)
Long story short: It should always exist the opposite of a 
keyword meaning, to interrupt it.


More information about the Digitalmars-d mailing list