tag:blogger.com,1999:blog-5638372.post115686611200927139..comments2023-10-10T05:22:56.347-05:00Comments on binkley's BLOG: Filling in the Java closure gapBrian Oxleyhttp://www.blogger.com/profile/06617364377560752378noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5638372.post-1156940184642650172006-08-30T07:16:00.000-05:002006-08-30T07:16:00.000-05:00Yes, unit testing would/should catch this.What wou...Yes, unit testing would/should catch this.<BR/><BR/>What would be irksome for me is that I wouldn't be able to search for all calls to a particular function. As well, you'd lose auto-completion functionality (ctrl-space in Eclipse).<BR/><BR/>Anyways, looks cool.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-1156882116399988502006-08-29T15:08:00.000-05:002006-08-29T15:08:00.000-05:00This is always a problem with reflection. However...This is always a problem with reflection. However most current refactoring environments (e.g., IDEA, Eclipse, etc.) have help for finding method and class name strings for refactoring.<BR/><BR/>This is an even more widespread problem for dynamic languages (Smalltalk, Ruby, Perl, et al), but it was on Smalltalk that the first refactoring IDEs were invented, so it is clearly surmountable.<BR/><BR/>One of the best guards against refactoring errors in the face of reflection (or dynamic languages) is unit testing. Before refactoring, make sure you have test coverage to detect broken method names in the functionals.Brian Oxleyhttps://www.blogger.com/profile/06617364377560752378noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-1156877436136586052006-08-29T13:50:00.000-05:002006-08-29T13:50:00.000-05:00Looks to be very interesting.One comment; the func...Looks to be very interesting.<BR/><BR/>One comment; the function definitions look to take a class parameter, and string parameter representing the function to be called.<BR/><BR/>Wouldn't this cause all kinds of refactoring headaches? If the function name changes, I don't see this generating any warnings.<BR/><BR/>Am I missing something with how reflection works?Anonymousnoreply@blogger.com