The D Scripting Language

Alexey Khmara alex.khmara at gmail.com
Tue Nov 16 06:31:26 PST 2010


"Script mode"  (actually - simple wrapper) would be better:
It could do simple parsing of script, bringing all "import" clauses to
the beginning and add some default imports (like std.stdio). It seems
that all code below imports can be wrapped into main declaration. So
for

writeln("hello, world!");

we get

import std.stdio;

int main(char[] argv) {
   writeln("hello, world!");
   return 0;
}

Trick will be to intercept error messages and change line numbers in
them to correct.

2010/11/16 gooba <gooba at digitalmars.com>:
> spir Wrote:
>
>> On Tue, 16 Nov 2010 09:44:06 +0100
>> Per Ångström <d-news at autark.se> wrote:
>>
>> > On 2010-11-16 01:10, Daniel Murphy wrote:
>> > > I think allowing the second expression in the ternary operator to be omitted
>> > > would be a better fit for D, and provide the same function.
>> > >
>> > > ie.
>> > > auto x = a ? a : b;
>> > > auto x = a ? : b;
>> >
>> > Personally I had '|||' in mind, but I'm OK with '?:'. I think it should
>> > be one single token and not an extension of the tertiary operator, though:
>> >
>> > auto x = condition ? a : b; // tertiary operator
>> > auto x = condition ? : b; // error, did you forget the middle operand?
>> > auto x = a ?: b; // OK
>>
>> Yes, then it becomes a binary operator :-) Read "a if defined, else b".
>>
>>
>> Denis
>> -- -- -- -- -- -- --
>> vit esse estrany ☣
>>
>> spir.wikidot.com
>>
>
> They now added Scala to scriptometer http://rigaux.org/language-study/scripting-language/ it sees abomination i/o classes don't stop it being better script language then d. What can do? Scala bad competition and straight better. Next release has std.script?
>



-- 
С уважением,
Алексей Хмара


More information about the Digitalmars-d mailing list