Re: [FalconJX] casting idea

2017-03-09 Thread Harbs
Huh. I did not know about @flexjsemitcoercion. Good to know! > On Mar 9, 2017, at 8:51 PM, Alex Harui wrote: > > > > On 3/9/17, 10:44 AM, "Harbs" wrote: > >> Umm... I guess I was not thinking clearly. (exhaustion can do that…) ;-) >> I was thinking that the casting happens when compiling th

Re: [FalconJX] casting idea

2017-03-09 Thread Alex Harui
On 3/9/17, 10:44 AM, "Harbs" wrote: >Umm... I guess I was not thinking clearly. (exhaustion can do that…) ;-) >I was thinking that the casting happens when compiling the app, but >that’s not true as the js from the library is pre-compiled. > >However, I don’t think I can globally disable “as” i

Re: [FalconJX] casting idea

2017-03-09 Thread Harbs
Umm... I guess I was not thinking clearly. (exhaustion can do that…) ;-) I was thinking that the casting happens when compiling the app, but that’s not true as the js from the library is pre-compiled. However, I don’t think I can globally disable “as” in TLF, and I don’t think we can do that in

Re: [FalconJX] casting idea

2017-03-09 Thread Alex Harui
On 3/9/17, 10:22 AM, "Harbs" wrote: >> You can turn off all "as" output in the cross-compile via >>-skipAsCoercions > >Only if you are compiling your own app — and you never rely on “as” >casting. > >That doesn’t help if you are writing a library. I guess I don't understand. IMO, either your

Re: [FalconJX] casting idea

2017-03-09 Thread Harbs
> You can turn off all "as" output in the cross-compile via -skipAsCoercions Only if you are compiling your own app — and you never rely on “as” casting. That doesn’t help if you are writing a library. > Nor do I want to be the person who implements it. Can’t say I blame you there… ;-) > On Ma

Re: [FalconJX] casting idea

2017-03-09 Thread Alex Harui
You can turn off all "as" output in the cross-compile via -skipAsCoercions compiler option. Then you shouldn't need @flexjsignorecoercion. And then you use @flexjsemitcoercion where you actually need it. Introducing new keywords makes me nervous, but I am not opposed to it. Nor do I want to be t

[FalconJX] casting idea

2017-03-09 Thread Harbs
It’s really a drag to constantly put in @flexjsignorecoercion every time I’m using “as” to make the compiler happy. 99% of the time I’m not interested in Language.as being added to the code. Here’s a thought: Can we add a new operator for non-essential casts? Something like this: var foo:Thing