On Mon, Aug 20, 2018, at 1:28 PM, Andy Moreton wrote: > On Mon 20 Aug 2018, Jostein Kjønigsen wrote: >> As I've mentioned in another reply on this subject, decoupling >> cc-mode>> releases from Emacs-releases will make it harder for third-party major->> modes deriving from cc-mode to maintain compatibility when cc-mode >> introduces breaking changes. >> Currently we can inspect "cc-mode version" by checking emacs-version,>> and dispatching compatible code based on that. > > Checking version numbers is the wrong approach for feature detection,> and should only be a last resort if checking behaviour is not > practical.> > If an ELPA package results in more frequent updates to cc-mode then > third party extension authors will simply have to adapt to a slightly> faster release cadence. > > AndyM > Agreed, but (to my knowledge) Emacs lacks proper introspection capacities, and there's no way up front to know if a function requires 3 or 5 parameters until you've called it and your code has crashed. Compared to that, verifying version numbers against known points of change seem like a much better strategy. It is also the advice I've received from other people around in the Emacs-community. -- Regards Jostein Kjønigsen jostein@kjonigsen.net 🍵 jostein@gmail.com https://jostein.kjonigsen.net