D to Javascript converter (a hacked up dmd)

Alix Pexton alix.DOT.pexton at gmail.DOT.com
Sat Mar 3 04:18:10 PST 2012


On 03/03/2012 12:12, Jacob Carlborg wrote:
> On 2012-03-02 15:57, Adam D. Ruppe wrote:
>> On Friday, 2 March 2012 at 09:33:44 UTC, Alix Pexton wrote:
>>> Have you considered faking scopes in JS using anonymous functions?
>>
>> Yeah, though right now I'm trusting the D compiler to
>> keep it straight, and it is doing a pretty good job
>> while being really simple to code.
>>
>> What happens is all the local variables are mangled
>> with respect to their full scope too (which leads to
>> ridiculously long, but unique names).
>
> Wouldn't you save a lot of characters by properly scoping the variables
> instead of using unique names? The compile JavaScript code would also be
> more readable.
>

and potentially faster!

A...


More information about the Digitalmars-d-announce mailing list