|
From: | Rik |
Subject: | Re: C++ deprecation and namespaces |
Date: | Thu, 7 Jul 2016 11:04:12 -0700 |
On 07/06/2016 02:01 PM,
address@hidden wrote:
Conceptually, the attribute tags get applied to each object that needs to be deprecated which does mean that if a lot of individual objects are being deprecated then there will be a correspondingly large number of attribute tags to add. "Perfect is the enemy of good". Instead of being perfect, are there some reasonable assumptions we can make to decrease the number of tags we need to add? For example, are most of the deprecations of deep internal functions that only Octave core programmers are going to encounter? If that is the case then we are already aware and can make the changeover in the core and forget about adding deprecation tags to those functions. Beyond that, how many instances are we actually considering? If it is less than 25 it is probably still faster to just code up rather than research convoluted syntaxes. Another possibility is simply not to be nice. When the old function is removed then code using it will fail to compile with a large error saying "XXX:XXX does not exist". This quite accurately points out what needs to be fixed and if we put a translation table up somewhere then a Google search for the error message will quickly locate how to change name A to name B in order to compile again. Can you make use of the C preprocessor. Could you define octave_foo to expand into calling #warning to issue a warning, followed by the correct prefix octave::foo? Maybe something here helps, Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |