Hi,

> If so, why do we want to add syntax instead of having the compiler figure out 
> that the value will
> never change?
That would be ideal but probably much more complex to implement than this 
patch. It may also we hard to work out if an expression as opposed to a 
variable is "constant" or not.

I'm not sure the MXML compiler (at this stage of compilation) can even work if 
the value will actually change or not? Anyone know?

>  If not, how will you know when to assign the value?
I think it would safe to assume that it's the initial assigned value. The 
intended use case (correct me here if I wrong) would be generally along the 
lines of:

public static const WIDTH:int = 200;

<s:List width="${WIDTH}" height="${WIDTH/2}" />

Might be a good idea to issue a compiler warning if you $ bind to a non const 
variable or expression but not stop you from doing that.

Thanks,
Justin

Reply via email to