I tend to use (or even overuse) double braces object intialization in GWT. For me it looks more readable and more declarative.
new FastMap<Object>(){{
put("Value", 12);
put("Unit", "Kg");
}};
Before today I was not aware that this syntax is not just instantiate object but also create AnonymousInnerClass for it. Now I am concerned how GWT deal with them.
- How this syntax affects perfomance of the execution?
- How this syntax affects compiled size?
- Any other bad thing?
I have thousands of such initializations in my app.