www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - On emulating C++ Namespaces (don't ask why)

reply 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
What am I violating here apart from the truth that our Mr. Walter 
doesn't like namespaces:

interface tlvs
{
       enum tlv { addr };

    static:
       void header();
}

Is this cool?

Thanks
May 04 2018
next sibling parent Radu <rad.racariu gmail.com> writes:
On Friday, 4 May 2018 at 17:50:59 UTC, 0xFFFFFFFF wrote:
 What am I violating here apart from the truth that our Mr. 
 Walter doesn't like namespaces:

 interface tlvs
 {
       enum tlv { addr };

    static:
       void header();
 }

 Is this cool?

 Thanks
`final abstract class` is what you are looking for.
May 04 2018
prev sibling parent reply Manu <turkeyman gmail.com> writes:
On 4 May 2018 at 10:50, 0xFFFFFFFF via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 What am I violating here apart from the truth that our Mr. Walter doesn't
 like namespaces:

 interface tlvs
 {
       enum tlv { addr };

    static:
       void header();
 }

 Is this cool?

 Thanks
But... modules?
May 04 2018
parent 0xFFFFFFFF <0xFFFFFFFF mail.com> writes:
On Friday, 4 May 2018 at 19:19:19 UTC, Manu wrote:
 On 4 May 2018 at 10:50, 0xFFFFFFFF via Digitalmars-d 
 <digitalmars-d puremagic.com> wrote:
 What am I violating here apart from the truth that our Mr. 
 Walter doesn't like namespaces:

 interface tlvs
 {
       enum tlv { addr };

    static:
       void header();
 }

 Is this cool?

 Thanks
But... modules?
I did intentionally sidelined modules, not an option
May 05 2018