I’m thinking that we should just add a Flash implementation of Map and WeakMap so users can simply use them directly. If they’re targeting browsers which support those classes, there’s no reason to have the overhead of an extra class to act as a proxy.
I do think we should replace the good event library for a few reasons: 1. I’m pretty sure that it’s heavier than we really need. 2. Like Alex mentions, there’s likely additional features we want. 3. I really wish we had the *option* to output node-style requires instead of good.require. If we could output node-style modules and requires, node modules could be first class citizens in Royale JS apps. Reliance on the closure libraries makes that much more difficult. My $0.02, Harbs > On Feb 25, 2018, at 6:03 AM, Greg Dove <[email protected]> wrote: > > With respect Alex, that does not sound too convincing to me. It is very > 'what if' based. > In my experience working within large enterprise (only pharma - which might > not be typical) anything that was not officially supported with security > updates was very quickly avoided. > > It would be a shame to hold back Royale based on that kind of premise > unless it was validated, imo. > One 'PAYG' option for this type of thing might be to not try to code too > much 'polyfill' stuff into the framework itself and perhaps require > external standardized polyfills as external js libs for the older browsers. > This seems to be what React has done [1] > That approach would still be limiting for features that can only be > addressed as polyfills though, and I'm pretty sure WeakMap is not one of > those. > > In terms of the weak reference listeners, perhaps WeakMap would allow the > possibility of actually achieving something there - I'm not sure (although > I expect it would probably be challenging), but I can't imagine getting > close to it without something like that to start with. > > 1.https://reactjs.org/docs/javascript-environment-requirements.html > > > > On Sun, Feb 25, 2018 at 1:54 PM, Alex Harui <[email protected]> > wrote: > >> I am told (no way to prove it) that if you are big enough company, you can >> get an extended support deal for one older version of IE than most people >> think you can. And many big companies standardize on IE using it almost >> like old green-screen terminals from before many of you were born. >> >> It would be really sad if some huge company came up to us and said "we're >> ready to migrate to Royale if you support IE(x)" and we said no and lost >> the participation. Since we can't easily react quickly to retrofitting >> old IE versions, I am tempted to make sure we work on IE one version back. >> That used to be 8 when we first started, right now it is 9, but it might >> be safe to go to 10, especially if it is a component set and not somewhere >> in the core. >> >> One other point to consider: Dictionary might be implementable on >> WeakMap, but I'm more concerned about weak reference event listeners (not >> to mention, priority listeners) that are two things Flash supports that >> Google Closure Library's event subsystem does not. How and when would we >> write such a thing and test it well enough to know it will work well >> enough to cut over to it and replace GCL's event subsystem that we >> currently use? >> >> -Alex >> >> On 2/24/18, 3:52 PM, "Piotr Zarzycki" <[email protected]> wrote: >> >>> Actually I'm even more for forget about IE11 and take care of Edge, Chrom >>> and Firefox. Before we got 1.0 maybe IE11 finally die. Sorry my experience >>> with that browser is awful. >>> >>> Piotr >>> >>> 2018-02-24 22:19 GMT+01:00 Greg Dove <[email protected]>: >>> >>>> That sounds great Harbs, so I guess the question is more: do we need to >>>> support IE10 and below, because targeting official support for these >>>> browsers seems to hold Royale back? >>>> >>>> If we did not do that, then we can avoid the 'just in case' support for >>>> them (legacy browser compatibility in classes like ObjectMap could be an >>>> explicit PAYG choice instead of default). >>>> It really hinges on what the baseline browser compatibility is/should be >>>> for Royale, and I think that might simply need a revisit/review given >>>> that >>>> time has passed and more will pass before 1.0. >>>> If IE10 and under holds us back a lot, and if it is unvalued by Royale >>>> users (idk whether it is or not, this is up for debate) then maybe it >>>> should not be part of the 'Basic' browser compatibility set any more... >>>> just a thought. >>>> >>>> >>>> >>>> On Sun, Feb 25, 2018 at 9:59 AM, Gabe Harbs <[email protected]> >>>> wrote: >>>> >>>>> There is a ObjectMap class which uses WeakMap or Map and falls back to >>>>> regular objects on platforms whether that is not supported. >>>>> >>>> https://na01.safelinks.protection.outlook.com/?url= >> http%3A%2F%2Froyale.ap >>>> ache.org%2Fasdoc%2F%23!org.apache.royale.utils% >> 2FObjectMap&data=02%7C01%7 >>>> Caharui%40adobe.com%7Cc64c7138af9b4015721b08d57be1 >> a08b%7Cfa7b1b5a7b344387 >>>> 94aed2c178decee1%7C0%7C0%7C636551131356035194&sdata= >> valyv5NoYslvqIDjyvhZy >>>> 2iMlLDQy9ZNnZBmAlvHMkg%3D&reserved=0 < >>>>> >>>> https://na01.safelinks.protection.outlook.com/?url= >> http%3A%2F%2Froyale.ap >>>> ache.org%2Fasdoc%2F%23!org.apache.royale.utils% >> 2FObjectMap&data=02%7C01%7 >>>> Caharui%40adobe.com%7Cc64c7138af9b4015721b08d57be1 >> a08b%7Cfa7b1b5a7b344387 >>>> 94aed2c178decee1%7C0%7C0%7C636551131356035194&sdata= >> valyv5NoYslvqIDjyvhZy >>>> 2iMlLDQy9ZNnZBmAlvHMkg%3D&reserved=0> >>>>> >>>>> It should be a decent replacement for Dictionary (including weak >>>>> references). The only caveat is you need to use get() and set() >>>> instead >>>> of >>>>> bracket access. >>>>> >>>>> I just added documentation and cleaned it up a bit. >>>>> >>>>> What’s interesting about that class is I needed to do some weird >>>> things >>>>> with the methods to reassign them. They are not showing up in the >>>> ASDoc >>>>> very well… >>>>> >>>>> There might be a better way to declare the method (variable) proxies. >>>> Not >>>>> sure… >>>>> >>>>> HTH, >>>>> Harbs >>>>> >>>>>> On Feb 24, 2018, at 9:10 PM, Greg Dove <[email protected]> wrote: >>>>>> >>>>>> That might make porting some legacy Flex code a >>>>>> lot easier, for example because (iiuc) I think that means Dictionary >>>> with >>>>>> weak keys could be supported. [3] (and I know Harbs did something >>>> related >>>>>> to this in the past, maybe some sort of polyfill, can't recall >>>> exactly) >>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> >>> Piotr Zarzycki >>> >>> Patreon: >>> *https://na01.safelinks.protection.outlook.com/?url= >> https%3A%2F%2Fwww.patr >>> eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com% >> 7Cc64c7138af9b40 >>> 15721b08d57be1a08b%7Cfa7b1b5a7b34438794aed2c178de >> cee1%7C0%7C0%7C6365511313 >>> 56035194&sdata=Q9k5PXy5ajgQoGMH37z2h%2BPvdlQPlVy1i4u5SQFAFfQ%3D& >> reserved=0 >>> <https://na01.safelinks.protection.outlook.com/?url= >> https%3A%2F%2Fwww.patr >>> eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com% >> 7Cc64c7138af9b40 >>> 15721b08d57be1a08b%7Cfa7b1b5a7b34438794aed2c178de >> cee1%7C0%7C0%7C6365511313 >>> 56035194&sdata=Q9k5PXy5ajgQoGMH37z2h%2BPvdlQPlVy1i4u5SQFAFfQ%3D& >> reserved=0 >>>> * >> >>
