Re: Simulating sub types

2013-08-02 Thread Jesse Phillips
On Friday, 2 August 2013 at 17:16:21 UTC, Meta wrote: Sorry to hijack the question, but this is relevant to the OP. I can't remember; are class member public or private by default? Public by default.

Re: Simulating sub types

2013-08-02 Thread Meta
On Friday, 2 August 2013 at 13:57:08 UTC, Dicebot wrote: On Friday, 2 August 2013 at 13:37:09 UTC, JS wrote: Then that doesn't help. Do you mean A.B is not visible outside the module either? Can B be instantiated and inherited when static, if not then it is no use. Yes, A will act simply as a

Re: Simulating sub types

2013-08-02 Thread JS
On Friday, 2 August 2013 at 13:57:08 UTC, Dicebot wrote: On Friday, 2 August 2013 at 13:37:09 UTC, JS wrote: Then that doesn't help. Do you mean A.B is not visible outside the module either? Can B be instantiated and inherited when static, if not then it is no use. Yes, A will act simply as a

Re: Simulating sub types

2013-08-02 Thread Dicebot
On Friday, 2 August 2013 at 13:37:09 UTC, JS wrote: Then that doesn't help. Do you mean A.B is not visible outside the module either? Can B be instantiated and inherited when static, if not then it is no use. Yes, A will act simply as a "namespace". If B is public, it can be accessed and inst

Re: Simulating sub types

2013-08-02 Thread JS
On Friday, 2 August 2013 at 12:29:02 UTC, Meta wrote: On Friday, 2 August 2013 at 11:47:46 UTC, bearophile wrote: JS: the fact remains that I can't do it in Dlang. Is tagging the inner class as static helping? class A { static class B { ... } } Bye, bearophile Just to be clear, markin

Re: Simulating sub types

2013-08-02 Thread Meta
On Friday, 2 August 2013 at 11:47:46 UTC, bearophile wrote: JS: the fact remains that I can't do it in Dlang. Is tagging the inner class as static helping? class A { static class B { ... } } Bye, bearophile Just to be clear, marking the inner class as static means that B will not hav

Re: Simulating sub types

2013-08-02 Thread bearophile
JS: the fact remains that I can't do it in Dlang. Is tagging the inner class as static helping? class A { static class B { ... } } Bye, bearophile