FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Module Naming Conventions

Post new topic   Reply to topic     Forum Index -> L8night
View previous topic :: View next topic  
Author Message

Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Wed May 05, 2004 6:28 pm    Post subject: Module Naming Conventions Reply with quote

I just downloaded all the items off of http://www.geocities.com/one_mad_alien/dcode/. Thanks for posting these projects. They look quite interesting. I have some suggestions about module naming conventions. It seems like there are quite a few levels of directories (nothing wrong with that), but I don't really understand why they're arranged in the way that they're arranged and how the modules are named internally.

Some examples:
module dfc.bitmap -> l8night.dfc.bitmap

module cmdline.options -> l8night.cmdline.options

module winex.dynloader -> l8night.winex.dynloader

My suggestion does add an identifier to each module, but I don't think it has to add any levels to the directories. Combining files under a l8night folder will facilitate sharing the files. For example, then I could put all of the libraries I download into \dmd\src and I could just add -I\dmd\src when I compile a project that depends on a l8night module. (I know I could do that myself now, but I'd rather not rename every module line every time I download a revision.)

Also, I don't understand why Core32 is called win32 internally. Can it be called one or the other?
Back to top
View user's profile Send private message AIM Address

Joined: 03 May 2004
Posts: 32
Location: UK

PostPosted: Fri May 07, 2004 6:25 am    Post subject: Reply with quote

all of this stems from my build system;
<root>/bin <= binary, lib and map file
<root>/obj/<path> <= where <path> is lib/core32/win32/api.obj etc
e.g <root>/lib/core32/win32/api.d
which is module 'win32.api' in libfile core32.lib
i.e. all of <root>/lib/<libname>/... will be made into bin/<libname>.lib
<root>/src/<projectname> <= the project files that use the libs.

it is also inline with D's phobos where 'std.c.stdio' is in <dmdroot>/src/phobos/std/c/stdio.d
phobos is the lib file name std/c/stdio the module path within the lib.
also makes it easy to zip-up a project library and allows several modules to co exist, and for different libs to have the same paths (i.e. a dev and a stable verison of the win32 headers for instance)
at present to include phobos manually its -Ic:\dmd\src\phobos
(but dmd know this as its in sc.ini)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> L8night All times are GMT - 6 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group