F i L wrote:
Dmitry Olshansky wrote:
Hm... If placed at the global scope it looks like a namespace.

I don't see anything wrong with that. It's just another way (somewhat
unique to D) you can categorize your code. Most people probably won't
use this sort of thing all over the place, but it actually might be
useful for "enforcing" naming classifications:

     // File system/io.d

     template Console
     {
         void write( ... )
         void read()
     }

final abstract class Console
{
    static:
    void write() { }
    void read() { }
}

Console.write();

P.S. Yes, simultaneous final and abstract actually works :)

Reply via email to