Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Joseph Hildebrand
Tests seem like a reasonable place to take a perf trade off though, right? Mobile/terse. DYAC. > On Nov 20, 2017, at 10:29 AM, Tom Schuster wrote: > > Please don't use proxies unnecessarily. They are bad for performance. > >> On Mon, Nov 20, 2017 at 5:05 PM, Joe Hildebrand >> wrote: >> You

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Tom Schuster
Please don't use proxies unnecessarily. They are bad for performance. On Mon, Nov 20, 2017 at 5:05 PM, Joe Hildebrand wrote: > You could also potentially use a Proxy object: > > https://gist.github.com/hildjj/1ac6e3d52e4e0d23f6289d73c1840a5a > > > On Nov 20, 2017, at 9:00 AM, Richard Newman wro

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Joe Hildebrand
You could also potentially use a Proxy object: https://gist.github.com/hildjj/1ac6e3d52e4e0d23f6289d73c1840a5a > On Nov 20, 2017, at 9:00 AM, Richard Newman wrote: > > Are there alternative ways we could achieve the same without the (or with > low) complexity/overhead? > > If I'm understandin

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Richard Newman
> > Are there alternative ways we could achieve the same without the (or with > low) complexity/overhead? > If I'm understanding correctly what you're trying to do, the typical suggestion here is to not use global singletons. That way you don't need to dig into the guts of a globally visible objec

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Mark Banner
On 20/11/2017 13:22, Nicolas B. Pierron wrote: On 11/20/2017 10:01 AM, Mark Banner wrote: Now that we don't have legacy add-ons outside of our control, I would like to propose that we stop using Object.freeze/Object.seal on most of our objects. I would personally recommend to every JavaScript

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Nicolas B. Pierron
On 11/20/2017 10:01 AM, Mark Banner wrote: Now that we don't have legacy add-ons outside of our control, I would like to propose that we stop using Object.freeze/Object.seal on most of our objects. I would personally recommend to every JavaScript developer that they should use these functions,

Re: Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Gijs Kruitbosch
On 20/11/2017 10:01, Mark Banner wrote: Now that we don't have legacy add-ons outside of our control, I would like to propose that we stop using Object.freeze/Object.seal on most of our objects. I believe that this was originally done to provide some extra security/stability relating to add-o

Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Mark Banner
[Resending to get the correct Firefox list] Now that we don't have legacy add-ons outside of our control, I would like to propose that we stop using Object.freeze/Object.seal on most of our objects. I believe that this was originally done to provide some extra security/stability relating to

Proposal: Stop using Object.freeze/Object.seal on most of our Javascript Objects

2017-11-20 Thread Mark Banner
Now that we don't have legacy add-ons outside of our control, I would like to propose that we stop using Object.freeze/Object.seal on most of our objects. I believe that this was originally done to provide some extra security/stability relating to add-ons, i.e. stop them messing with our inte