DIP11: Automatic downloading of libraries
Nick Sabalausky
a at a.a
Sun Jun 19 11:41:41 PDT 2011
"Jacob Carlborg" <doob at me.com> wrote in message
news:itko61$1qdm$1 at digitalmars.com...
> On 2011-06-18 21:35, Nick Sabalausky wrote:
>>
>> I'd probably consider something more like:
>>
>> orb.ver = "1.0.0";
>> orb.author = "Jacob Carlborg";
>> orb.type = Type.library;
>> orb.imports = ["a.d", "b.di"]; // an array of import files
>
> That would be doable in Ruby as well. I though it would be better to not
> have to write "orb." in front of every method. Note the following syntax
> is not possible in Ruby:
>
> ver = "1.0.0"
> author = "Jacob Carlborg"
> type = Type.library
> imports = ["a.d", "b.di"]
>
> The above syntax is what I would prefer but it doesn't work in Ruby, would
> create local variables and not call instance methods. Because of that I
> chose the syntax I chose, the least verbose syntax I could think of.
>
That syntax should be doable in D.
>>> DSSS forced an INI-similar syntax on people.
>>>
>>
>> INI-syntax is trivial. Especially compared to Ruby (or D for that matter,
>> to
>> be perfectly fair).
>
> I was thinking that the Ruby syntax was as easy and trivial as the
> INI-syntax if you just use the basic, like I have in the examples. No need
> to use if-statements, loops or classes. That's just for packages that need
> to do very special things.
>
But then the people who do such fancy things have to do it in Ruby instead
of D.
> To take the DSSS syntax again as an example:
>
> # legal syntax
> version (Windows) {
> }
>
> # illegal syntax
> version (Windows)
> {
> )
>
> I assume this is because the lexer/parser is very simple. You don't have
> this problem if you use a complete language for the config/spec files.
>
Right. And D is a complete language.
>>
>> 1. The amount of extra stuff is fairly minimal. *Especially* in the
>> majority
>> of cases where the user uses the standard name ("orbconf.d" or whatever
>> you
>> want to call it).
>
> OK, I guess you can get away without the IO, but you still need the extra
> processes.
>
That should be pretty quick.
More information about the Digitalmars-d
mailing list