D - untangling import
- Helmut Leitner (25/25) Apr 09 2003 IMHO the current import name system will lead to
- Benji Smith (3/22) Apr 09 2003 I agree wholeheartedly.
- Matthew Wilson (17/41) Apr 09 2003 That's what I've done.
IMHO the current import name system will lead to I think we will see lots of collisions similar to import windows.d (which one? phobos? pavel's?) in the future. Why not learn a bit from Java. Java suggest to prefix imports with the own name or domain preserving "java" for its own use. Using this import phobos.windows import pavel.windows import com.mycorp.lib.windows could live happily together. If we then would standardize on a source tree like c:\dm\... c:\dmd\... c:\d\pavel\... c:\d\dig\... c:\d\myname\aproject\... c:\d\com\mycorp\lib\... and default includes (in c:\dmd\bin\sc.ini): DFLAGS="-I\dmd\src -I\d" we could exchange and use our code a lot easier. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
Apr 09 2003
I agree wholeheartedly. --Benji In article <3E943279.380DFC7C hls.via.at>, Helmut Leitner says...Using this import phobos.windows import pavel.windows import com.mycorp.lib.windows could live happily together. If we then would standardize on a source tree like c:\dm\... c:\dmd\... c:\d\pavel\... c:\d\dig\... c:\d\myname\aproject\... c:\d\com\mycorp\lib\... and default includes (in c:\dmd\bin\sc.ini): DFLAGS="-I\dmd\src -I\d" we could exchange and use our code a lot easier. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
Apr 09 2003
That's what I've done. My D stuff is under my free-arm - SynSoft - which is the imprint for doing D, Java, .NET, Perl and Python. (http://synsoft.org, if anyone's interested). The D modules take the form synsoft.win32.perf synsoft.text.token synsoft.com.combase etc. I've not bothered with the .org, as in org.synsoft.win32.perf. As you say, I can't imagine anything other than this causing problems. Indeed, I think the base stuff should be prefixed either with d, or with phobos, as in d.lang.string phobos.win32.gdi etc. "Helmut Leitner" <leitner hls.via.at> wrote in message news:3E943279.380DFC7C hls.via.at...IMHO the current import name system will lead to I think we will see lots of collisions similar to import windows.d (which one? phobos? pavel's?) in the future. Why not learn a bit from Java. Java suggest to prefix imports with the own name or domain preserving "java" for its own use. Using this import phobos.windows import pavel.windows import com.mycorp.lib.windows could live happily together. If we then would standardize on a source tree like c:\dm\... c:\dmd\... c:\d\pavel\... c:\d\dig\... c:\d\myname\aproject\... c:\d\com\mycorp\lib\... and default includes (in c:\dmd\bin\sc.ini): DFLAGS="-I\dmd\src -I\d" we could exchange and use our code a lot easier. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
Apr 09 2003