Re: Namespaces like C++

2017-01-16 Thread Andrey via Digitalmars-d-learn
On Monday, 16 January 2017 at 19:17:57 UTC, Mike Parker wrote: D namespaces generally follow the format [package names].moduleName.Type. So to have ui.Manager, then either the module, not the package, needs to be named 'ui', or you need to do the following: // file ui/package.d module ui; pub

Re: Namespaces like C++

2017-01-16 Thread Mike Parker via Digitalmars-d-learn
On Monday, 16 January 2017 at 18:02:09 UTC, Andrey wrote: Hello, can I using namespaces like in C++, for example: ui::Widget or ui::Manager? I created ui/widget.d and ui/manager.d for implementation classes Widget and Manager, bun I can't import their correctly for using ui.Manager uiManager;

Re: Namespaces like C++

2017-01-16 Thread rjframe via Digitalmars-d-learn
On Mon, 16 Jan 2017 18:02:09 +, Andrey wrote: > Hello, can I using namespaces like in C++, for example: ui::Widget or > ui::Manager? I created ui/widget.d and ui/manager.d for implementation > classes Widget and Manager, bun I can't import their correctly for using > ui.Manager uiManager; > If

Namespaces like C++

2017-01-16 Thread Andrey via Digitalmars-d-learn
Hello, can I using namespaces like in C++, for example: ui::Widget or ui::Manager? I created ui/widget.d and ui/manager.d for implementation classes Widget and Manager, bun I can't import their correctly for using ui.Manager uiManager; If it is impossible, then what is the best way to using nam