@disable

KennyTM~ kennytm at gmail.com
Fri Jan 15 17:00:20 PST 2010


On Jan 16, 10 01:01, The Anh Tran wrote:
> Andrei Alexandrescu wrote:
>> The main idea is to allow creation of noncopyable types by marking
>> this(this) as @disable.
>>
>> Noncopyable types are pivotal for a number of idioms important in
>> concurrency and elsewhere.
>>
>>
>> Andrei
>
> IMHO, we could extend existing syntax instead of invent new one.
> I really love the Scale style:
>
> Excerpt from Scala reference. Page 59.
> package outerpkg.innerpkg
> class Outer
> {
> class Inner
> {
> private[Outer] def f()
> private[innerpkg] def g()
> private[outerpkg] def h()
> }
> }
>
> http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaReference.pdf
>

The @attribute syntax is designed to be used like this. (Although 
currently they're all keywords in the future you may be able to have 
@identifier_of_custom_attribute).



More information about the Digitalmars-d mailing list