incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <>
Subject Re: [Proposal] Add PostCodeValidator and PostCodeFormatter to the SDK
Date Sat, 10 Mar 2012 03:41:04 GMT

>>> *) suggestFormat Should be separated from the Validator as it is not "necessary"
to use the Validator (dependencies, dependencies)
>> I think the connivence of having a single class is better. But happy to be convinced
otherwise. Can you give a code sample?
> I attached three examples how it think it could work else. All have less dependencies
and better performance.

I like what you did with the POST_CODE_FORMAT. I had to look twice to see what you had done
with the ='s and why at first I thought it was missing values and ;'s. The code is not is
a style (using public cost objects as maps) that's used elsewhere in the SDK and certainly
not any of the other validators. So I guess the question is do we want to break with tradition
with a plan to change the other validators at a later stage? Might need to get a few other
peoples input on this.

BTW Performance wise it may actually be worse (I'm not measured) as I don't believe the POST_CODE_FORMAT
assignment code gets JITed (but not 100% sure). I don't think the few ms either way here are
an issue in this case so that probably no need to have a discussion about that.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message