What library functionality would you most like to see in D?

Jonathan M Davis jmdavisProg at gmx.com
Sun Jul 31 18:45:50 PDT 2011


On Monday 01 August 2011 03:31:41 Andrej Mitrovic wrote:
> Btw why not take DDMD's lexer.d and start from there?

It's a possibility but has 2 downsides to it.

1. Due to licensing issues, you have to get permission from the ddmd 
developers. The front-end is LGPL IIRC, not Boost. Walter gave permission to 
port the lexer from the front-end to D and make it Boost, but that doesn't 
hold for the ddmd code, which was taken from dmd's front-end and ported by 
other folks. So, their permission would be required. It's not necessarily a 
big deal, but it is something that needs to be dealt with.

2. To really do it right, you need to understand how it works. Personally, I 
think that doing all the work of porting it is going to help a _lot_ in 
gaining that understanding. If all you do is take and adjust the ddmd code, 
then you don't gain that understanding.

So, ddmd's source code definitely could be used as the base for Phobos' D 
lexer, but I haven't taken the time to deal with #1, and because of #2, I find 
it very valuable to do the porting myself. I haven't gotten very far on of it 
of late though. Taking ddmd and adjusting would probably be faster, but as a 
maintainer of the result, it would be harder to maintain just because I 
wouldn't understand it as well.

- Jonathan M Davis


More information about the Digitalmars-d mailing list