If I have an object with 50 getters/setters, where every 10 of them is defined under a new interface, and I type the object as one of those interfaces, will it increase performance?
Not sure how method/variable lookups work, but it seems that if you type the object to something that has fewer methods, it would be faster to run those methods?
I'm asking for Actionscript/Java, but this applies to any language I guess.
So if I had an object, DisplayObject, that implemented 5 interfaces (IResizable, IScalable, IMovable, IMeasurable, IDrawable), and I typed it as IResizable to access the x and y accessors, is that an optimization?
Otherwise it seems the only use for interfaces is to make your code more readable, and to make sure you stick to defined patterns.