On Friday, 10 June 2016 at 22:01:53 UTC, Walter Bright wrote:
On 6/10/2016 3:55 AM, Chris wrote:
> Cool. I'd love to see `DScript` one day - and replace JS once
and for all ...
> well ... just day dreaming ...

Dreams are reality:

https://github.com/DigitalMars/DMDScript

I just tried to compile it on Linux with dmd v2.071.0 in 64bit mode. The compiler emits loads of deprecation warnings concerning module import, and it seems to be geared towards 32bit:

[...]
engine/source/dmdscript/dstring.d(953,16): Deprecation: module std.string is not accessible here, perhaps add 'static import std.string;' engine/source/dmdscript/expression.d(216,9): Warning: statement is not reachable engine/source/dmdscript/expression.d(306,28): Deprecation: module std.ascii is not accessible here, perhaps add 'static import std.ascii;' engine/source/dmdscript/expression.d(318,9): Error: static assert (8LU == 4LU) is false
dmd failed with exit code 1.

The error message refers to:

`    override void toIR(IRstate *irs, uint ret)
    {
static assert((Identifier*).sizeof == uint.sizeof); // <======
        if(ret)
        {
            uint u = cast(uint)Identifier.build(string);
            irs.gen2(loc, IRstring, ret, u);
        }
    }
`

Reply via email to