Actually, after years of developers complaining about the overly-aggressive
and useless message only Firefox was showing, it looks like modern versions
don't.

At this point I believe this is a GJS only issue because it's based on old
version of moz.js

Is there any roadmap available to understand when I can drop transpilation
all together and use ES2015 instead on GJS?

Thanks

On Fri, Apr 14, 2017 at 12:43 PM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:

> > they really really don't want you mutating the prototype of an object.
> It must really be that slow.
>
> It's part of standard specifications and it's cheaper than any other
> workaround that would avoid using `Object.setPrototypeOf`, including a
> Proxy.
>
> They really should mind their business, or complain with TC39 instead, IMO.
>
> As summary, should I blame Mozilla and file a bug there?
>
> Thanks
>
> On Fri, Apr 14, 2017 at 4:32 AM, <philip.chime...@gmail.com> wrote:
>
>> On Thu, Apr 13, 2017, 11:23 Andrea Giammarchi <
>> andrea.giammar...@gmail.com> wrote:
>>
>>> Apparently, the latest GJS warns about "stuff" even if executed through
>>> GJS_DISABLE_EXTRA_WARNINGS=1 flag.
>>>
>>> Gjs-Message: JS WARNING: [/app/lib/jsgtk/jsgtk_modules/jsgtk/babel.js 26]: 
>>> mutating the [[Prototype]] of an object will cause your code to run very 
>>> slowly; instead create the object with the correct initial [[Prototype]] 
>>> value using Object.create
>>>
>>>
>>> This message is completely useless/pointless when it comes to transpiled
>>> code, and to be honest, it's been always useless on Firefox consoles too
>>> 'cause developers setting or mutating a prototype 99% of the time have
>>> valid reasons to do so.
>>>
>>> Am I missing yet another flag to ask GJS to kindly "shut-up" or any
>>> attempt to normalize Gir classes as JS will show these kind of warnings?
>>>
>>> Thanks for any sort of explanation/hint about this.
>>>
>>
>> Hi Andrea,
>>
>> It's true, this warning is not affected by the disable-extra-warnings
>> setting. I don't have an explanation why the Firefox devs chose to make it
>> that way, except maybe they really really don't want you mutating the
>> prototype of an object. It must really be that slow.
>>
>> You could try to use an ES6 Proxy to achieve what you want.
>>
>> Regards,
>> Philip C
>>
>>>
>
_______________________________________________
javascript-list mailing list
javascript-list@gnome.org
https://mail.gnome.org/mailman/listinfo/javascript-list

Reply via email to