flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: New Flex to JS project
Date Mon, 07 Jul 2014 04:49:59 GMT
I certainly won't stop someone from trying to implement e4x in JS.  I
think there may already be some attempts.  I think a significant number of
folks use dot-path like Mark Kessler reported and so it will still be a
porting challenge for folks to re-code to using functions.

That's why it isn't on my priority list: if you're going to port your e4x
dot-path expressions, it might just be better to go to JSON instead.  I
think any attempt to do e4x requires custom data objects with getters
because there are many scenarios where it isn't clear to the compiler that
you are compiling e4x.  For example, as the data property in an item


On 7/5/14 11:41 PM, "Harbs" <harbs.lists@gmail.com> wrote:

>I think it is.
>Partial E4X support is better than none. We could offer support for the
>more verbose form. I imagine it should be possible to do some conversions
>of our own when compiling as well.
>I'm not sure how to go about handling filters though.
>On Jul 5, 2014, at 9:29 AM, Alex Harui <aharui@adobe.com> wrote:
>> I've not looked to see if the compiler does that or the runtime.  I
>> it is the runtime isn't it?
>> -Alex
>> On 7/4/14 10:12 AM, "Gordon Smith" <gsmithsf@hotmail.com> wrote:
>>> I think this syntax is just sugar for more verbose function calls like
>>> trace(foo.children("is"))
>>> but the terse syntax is much nicer.
>>> - Gordon
>>> Sent from my iPad
>>>> On Jul 4, 2014, at 12:22 AM, "Alex Harui" <aharui@adobe.com> wrote:
>>>> There are functions, but I've seen significant use of XML as an
>>>> "Object".
>>>> IMO it is what makes e4x possible: the dot-path lookup as below:
>>>> Var foo:XML = <this><is><a name="test" /></is></this>
>>>> Trace(foo.is);
>>>> Trace(foo..a(@name=="test"));
>>>> Trace(foo..test);
>>>> But I could be wrong and there is some other way to handle this.
>>>> -Alex
>>>>> On 7/3/14 12:51 PM, "Harbs" <harbs.lists@gmail.com> wrote:
>>>>> Why does it need setter/getter? E4X is all functions isn't it?
>>>>> Yeah. JSON is generally a better way to go, but some APIs are still
>>>>> and then there's manipulation of XML documents (which I tend to do a
>>>>> lot
>>>>> of...)
>>>>>> On Jul 3, 2014, at 7:53 PM, Alex Harui <aharui@adobe.com> wrote:
>>>>>> I took a quick look a while back.  Required getter/setter support
>>>>>> the
>>>>>> browser.  And then the remaining question: will it perform?  It is
>>>>>> similar
>>>>>> to the AMF question.  Doable, but may not be faster than switching
>>>>>> JSON.
>>>>>> -Alex
>>>>>>> On 7/3/14 9:48 AM, "Harbs" <harbs.lists@gmail.com> wrote:
>>>>>>> Has anyone looked into writing a js library to copy the
>>>>>>> of
>>>>>>> E4X?
>>>>>>> It seems to me that at least 90% of E4X could be pretty easily
>>>>>>> replicated
>>>>>>> in a js libraryĆ 
>>>>>>> Besides namespaces, the only thing that seems hard to me is complex
>>>>>>> selectors.
>>>>>>>> On Jul 2, 2014, at 7:53 PM, Alex Harui <aharui@adobe.com>
>>>>>>>> FWIW, FlexJS is eventually going to need to find a way to
>>>>>>>> about
>>>>>>>> use of E4X

View raw message