[x3d-public] FreeWRL: I'm not sure what the standard says, but consider enabling ECMAScript's "let" in FreeWRL

GPU Group gpugroup at gmail.com
Fri Sep 15 08:10:28 PDT 2023


Most recent duktape doesn't support "let" although some of duktape's
developers have tinkered with it.
https://github.com/svaarala/duktape/issues/2000
Most recent libmozjs / spidermonkey does / should support let:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let

x however freewrl uses an older libmozjs 24, versus most current is over
100.
x last time I tried to build libmozjs on windows I gave up
-Doug

On Thu, Sep 14, 2023 at 4:56 PM John Carlson <yottzumm at gmail.com> wrote:

> Christoph.
>
> 1) These aren't global variables, they are local to a function.
>
> 2) let doesn't declare a global variable.
>
> 3) global variables are frowned and warned about in X3D.
>
> 4) let is much better for scoping than var.
>
> John
>
> On Thu, Sep 14, 2023 at 5:29 PM Christoph Valentin <
> christoph.valentin at gmx.at> wrote:
>
>> Just fyi......
>>
>> When I tried to write browser stiff ecmascript for X3D Script nodes, I
>> decided to use only var and to use it for local variables.
>>
>> I avoided to have global ecmascript variables and used "field"s of the
>> Script nodes instead.
>>
>> I do not remember WHY i did this decision.
>>
>> Kr,
>> CP/V
>>
>> --
>> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
>> gesendet.
>> Am 14.09.23, 23:01 schrieb John Carlson <yottzumm at gmail.com>:
>>
>>> Doug,
>>>
>>> Let me know if there's some configuration to enable ECMAScript's "let"
>>> way of declaring variables in FreeWRL.  Otherwise, I have to use var.
>>>
>>> Thanks!
>>>
>>> John
>>> _______________________________________________ x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230915/70b59d13/attachment.html>


More information about the x3d-public mailing list