On 3/8/17, 3:53 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>Wow! > >TLF is seriously spaghetti code. I have been working on removing circular >dependencies for about 16 hours straight. There are more A -> B -> A >dependencies than I can count. > >What a pain! I hear you. I don't know if I would call it spaghetti, but it sure seems complex for what it does. For those who are wondering... IMO, there are two kinds of circular dependencies. The first kind is truly circular and is not allowed by ActionScript. The second is circularities not allowed by the Google Closure Compiler but is actually perfectly legitimate ActionScript and Javascript. The second kind of circularity isn't truly spaghetti code. Even simple circularities make sense. For example: Class Parent { var children:Vector.<Child>; } Class Child { var parent:Parent; } This is not allowed by the Google Closure Compiler but is perfectly fine code, IMO. Please make sure you think it is worth >16 hours of work to clean it up in TLF. I doubt TLF has any true circularities, otherwise we wouldn't be able to compile it and run it for SWF. Good luck, -Alex