Re: New AS3 language feature: Arrow function syntax

2025-07-19 Thread Greg Dove
Hi Josh, Functionality first, performance second is always the mantra (or at least I think it is). Thanks again for this, and I hope that whatever you're facing resolves or eases as quickly as you could hope for. Whatever it is, it certainly comes first. Only because you asked for feedback: The i

Re: New AS3 language feature: Arrow function syntax

2025-07-18 Thread Josh Tynjala
Hi Greg, There is no warning for omitting the return type when the braces are omitted. The compiler infers the return type from the body expression. I thought about requiring the infer-types compiler option for that, but considering that it is all new syntax, I feel like maybe it just makes sense

Re: New AS3 language feature: Arrow function syntax

2025-07-18 Thread Greg Dove
Nice work, Josh! I just tried with var test:Function = () => true; Is that supposed to be ():Boolean => true ? fyi if it is, I did not see a warning (I don't think) I assume you are simply outputting the same 'conversion' for swf in the js output at the moment ? On Fri, Jul 18, 2025 at 2:37

Re: New AS3 language feature: Arrow function syntax

2025-07-18 Thread Harbs
Awesome! :-) > On Jul 18, 2025, at 1:48 AM, Josh Tynjala wrote: > > Hey folks, > > I just wanted to highlight a new AS3 language feature that I have recently > implemented in the Royale compiler: arrow function expressions! > > If you're not familiar, these were added to JavaScript a while bac

New AS3 language feature: Arrow function syntax

2025-07-17 Thread Josh Tynjala
Hey folks, I just wanted to highlight a new AS3 language feature that I have recently implemented in the Royale compiler: arrow function expressions! If you're not familiar, these were added to JavaScript a while back. Here are the MDN docs for the JS version: https://developer.mozilla.org/en-US