Hi,

> I don't think this is a release critical issue, but it is an interesting 
> topic.

Agreed not for this release anyway but coming up with a common pattern would be 
useful.

>  AFAICT, strings optimize better than constant lookups.

Have you done any tests to show this is the case?

>  The tradeoff is that folks lose developer productivity to mis-spelling or 
> mis-capitalizing event names.

A single error here could cost multiple users a lot of time. Just wondering is 
there anther way it can be done safely?

>  I don’t think there is enough pay-off to having lots of event classes with 
> the
> same or similar set of properties bloating the output.  It is pretty rare
> to have to check the type of the Event.

But you need the the event name in order to add/remove event listeners.

>  I want to avoid that somehow in FlexJS.

I would assume that the compile removes stuff that is not referenced if not at 
compile time, then at runtime. So possibly the only cost is in the size of the 
classes and run time lookup od statics. Having static strings would reduce the 
size of the classes so it seems it may be a site vs runtime cost. I’m guessing 
that runtime cost is very small but again not done any tests to see if that is 
actually the case.

Thanks,
Justin

Reply via email to