[Networkit] C++14, Deprecated Code and Project Evolution
christian.staudt at kit.edu
Mon Nov 9 22:52:36 CET 2015
> One reason would be that gcc 4.9 is not in the repositories for Ubuntu 14.04, the current LTS version.
> Using the current Dev branch of NetworKit would require system upgrades or manual installation of gcc for Elisabetta and me.
> Since we are probably not outliers in the user base, this would affect many other users as well.
If it is complicated for Linux distributions to get a current, that is a reason not to switch now. (On the Mac, it is quite easy with Homebrew). I’ve reset it to C++11. However, I would like the option to compile with C++14.
@Max: Since the setup script is your thing, I think you may know better how to do this (without requiring the compiler command to have a specific name).
> There should definitely be a warning regarding code that is marked for deletion (and a reason why to do so) before this is going to happen. In that sense a [[deprecated]] flag is a step forward (but the original developer should also be pointed to it). However, the same functionality could be obtained differently with only minor overhead.
The deprecation warning comes with a message that gives the reason.
In general, I think it is important to understand that for every line of code added to an evolving project, a regular rent is due in the form of maintenance programming work. (This is also why adding stuff is not per se good). Eventually somebody has to pay the rent, or one of two things will happen: Either the project evolution will stop, or old code will stop working. Now who should pay the rent - authors of new code or authors of old code? And what should happen if the rent isn’t paid?
I think it is better to have abandoned code stop working than to stop the evolution. Rather than expecting that updates must never break anything, we should expect that existing code needs to be maintained in order to stay functional. So rent is due from authors of old code, at least a fair share of it. As far as I am maintaining the project, I think I should strategically remove stuff and even break things if leaving them imposes too much of the maintenance cost on authors of new code. Deprecation warnings are a soft way to start doing this.
> Does this also get through to Python users? I guess the Python code has to be annotated as well?
In Python a DeprecationWarning (https://docs.python.org/3.5/library/exceptions.html#DeprecationWarning) can be raised like an exception. Since the Python code is less interwoven, I haven’t used it so far.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5084 bytes
Desc: not available
More information about the NetworKit