D modules/sourcecode organisation/filesystem mapping

Anders F Björklund afb at algonet.se
Thu May 11 00:49:06 PDT 2006


FunkyM wrote:

>>Like I said, maybe it's because I'm already used to how D works or maybe I 
>>haven't worked in projects that large, but I haven't found the current module 
>>system limiting. I think the worst thing about it is when you import two modules 
>>which have the same function defined and then the compiler complains about which 
>>one you want to call, and that's not even a problem of modules but of D rules 
>>about resolving names. And anyway, it's not that difficult to write a couple of 
>>aliases to get around it.
> 
> As I noted, for some people those limitations won't be the "rock in the eye" and
> they will still be able to create projects as they like (build their games etc.)
> with how D is working now. However, there will be a point in mid-/long-term that
> will heavily define D's future upon this issue and for me it is already one.
> 
> It might take experience in the "other" languages C++/Java/C#/(any other high
> level OOPL) and maybe some farsight to draw the lines. I guess it will only be
> instantly obvious for people who stumbled among the same limitations when coming
> from pure D. (and totally not seen as required from C purists ;)

There is something related in the wxD project, with the wxD class names:
(there's a long list at http://wxd.sourceforge.net/docs/annotated.html)

in C++, it is called "wxWindow". (avoiding namespaces) "<wx/window.h>"
         http://www.wxwidgets.org/manuals/2.6.3/wx_wxwindow.html

in C#, it is called "wx.Window". (using namespace: wx) in "Window.cs"
        http://wxnet.sourceforge.net/apiref/wx/Window.html

in D, it is called "wx.Window.Window" (because code is in "Window.d")
       http://wxd.sourceforge.net/api/classwx_1_1_window_1_1_window.html

As a side note, we're using "import wx.wx;" to import every wxD module.
And after you've imported that, you can use a short name like "Window".

--anders



More information about the Digitalmars-d mailing list