tag:blogger.com,1999:blog-7419328659153232360.post2321641702515075834..comments2013-01-06T22:04:31.725+01:00Comments on Yoaws Consult Blog: Version-ed interfaces to refine a product specification?Keld Ølykkehttp://www.blogger.com/profile/00550811215787990162noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7419328659153232360.post-14083253195405527082010-10-17T15:50:37.238+02:002010-10-17T15:50:37.238+02:00Hi Pelle,
Sorry for being slow, but for some reaso...Hi Pelle,<br />Sorry for being slow, but for some reason I got no notification mail from blogspot when you added your comment.<br />> But how would you handle changes in method signature? <br />If you are thinking about how to invalidate a version 1 method when releasing a version 2 method, it would be nice if we could choose between doing it softly (non-breaking) or in a harsh manner (breaking).<br />A soft way could be to new the method in version 2 and annotate it with the Obsolete attribute (mark it as deprecated). It will then generate a compile warning when used.<br />A harsh way doesn't really exist as far as I know e.g. to force a deprecated method - specified by an interface - to throw a runtime exception if used.Keld Ølykkehttps://www.blogger.com/profile/00550811215787990162noreply@blogger.comtag:blogger.com,1999:blog-7419328659153232360.post-81912490829178144782010-09-01T10:07:10.464+02:002010-09-01T10:07:10.464+02:00Interesting idea! With the help from modern IDEs, ...Interesting idea! With the help from modern IDEs, the task of switching (search/replace) from V1 to V2 is not as tedious as it used to be. Also, with the inheritence between V1 and V2 it is not necessary to upgrade legacy code to use V2 (unless V2 introduces new methods that the legacy code must use). <br /><br />But how would you handle changes in method signature? Create a new method with the same method name, or make sure to change the name also?Pelle Stenild Coltauhttps://www.blogger.com/profile/02030661970008085622noreply@blogger.com