rdmd

Christopher Wright dhasenan at gmail.com
Sat Mar 7 10:37:43 PST 2009


Andrei Alexandrescu wrote:
> Christopher Wright wrote:
>> Okay, here's an improved version of rdmd with config files.
> 
> Thanks, that's interesting.
> 
>> Added features:
>> - Config file
>>   - Specify a compiler
>>   - Specify default imports for --eval
>>   - Specify build flags
> 
> I'm sorry, I think a config file is overkill. Perl has many more options 
> and does fine without any configuration besides the envvar PERL5LIB.
> 
> But indeed there must be a possibility to veer away from the hardcoded 
> imports.

It depends on whether --eval is going to be used to any reasonable 
degree. I don't think it is, so config files are overkill.

>> - Option to show source with --eval
> 
> Sounds good.
> 
>> - Changed the definition of "main" with --eval to use 'in char[][]' 
>> rather than 'string[]' (the args probably don't matter much anyway)
> 
> in char[][] is the worst of the pack because it's the supertype of both 
> immutable and mutable. You're better off with either string[] or char[][].

But tango doesn't deal with string.

You could add at the top:
static if (!is (string)) alias char[] string;

>> - Executables are stored in the temp directory, not the current 
>> directory. This way, they can be reused even if you change 
>> directories; and they don't clutter up your working directory.
> 
> That's a good idea.

When I saw that rdmd put the executable with an insanely long name in my 
working copy, I was quite annoyed.

>> Attached is a sample rdmd.conf as well as the modified source (based 
>> on r958 from the phobos repository).
> 
> Thanks. Let's hold off on that for a bit until we all have the same phobos.

The only difference due to different phoboses is using FILE* rather than 
struct File.


More information about the Digitalmars-d-announce mailing list