Ah,
Your talking about compiler extensions. There has been discussion
about this and in a new compiler prototype this will be entirely
possible along with a full configurable and customizable front and
back end for a compile session.
A ways down the road as there are some very interesting developments
at the moment with some other things...
Mike
Quoting Lee Burrows <subscripti...@leeburrows.com>:
Having metadata as first class citizens would be great but its not
what i was talking about - clearly my fault as no-one gets what i
mean ;)
In the same way that adding [Bindable] to a property causes compiler
to add extra code in form of watchers and listeners, if i add my own
metatag i'd like to be able to tell the compiler what to do with it.
A simple example...
i add [MyFabLoggingTag] to my code and compiler replaces it with
trace("constructor"); when it finds it in a constructor,
trace("myMethod()", arg1, arg2); when it finds tag in a method etc.
In essence, anything that can be done with reflection, could be done
at compile time instead.
Hope that makes sense?
On 02/02/2013 18:15, Michael Schmalle wrote:
Hi,
I don't know if what Lee is talking about is high level or low
level. High level -keep-as3-metadata has been around for eons but
lowlevel language support does not exist.
There is actually a JIRA ticket for "Make metadata First class
citizens" that was talked about.
I'm going to be working on that in the future. So just like Java,
metadata can be compile time checked and would automatically aid
IDE's for code completion.
Basically, it would make a metadata annotation like a class type definition.
Mike
Quoting Avi Kessner <akess...@gmail.com>:
Actually it is possible.
Robotlegs uses it extensively.
brought to you by the letters A, V, and I
and the number 47
On Sat, Feb 2, 2013 at 7:48 PM, Lee Burrows
<subscripti...@leeburrows.com>wrote:
Hi all,
I dont know enough (i.e. anything) about the flex compilers so bear with
me...
How difficult would it be to get the compiler to process custom metatags
(e.g. as currently done with [Bindable])? I'm assuming it's not already
posssible as i've found no mention of it by googling.
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com