Trimming old code
Rik Griffin (98) 264 posts |
I was wondering what the general opinion is on this … Say I’m updating some code, and there’s a load of old stuff in there surrounded by Clearly this code is never going to be compiled, no one is going to be using the ROOL codebase to build Arthur components. Why not just delete it and simplify the source code? A real example: Filer Action contains optional code to use 64 bit integers for count operations. I can’t imagine why we’d ever go back to using 32 bit ints. You need a 64 bit capable compiler to compile RISC OS so that’s a non issue. My feeling is strip out old code to improve readability. After all, the old stuff is there in the CVS if anyone really wants to see it. |
Jeffrey Lee (213) 6048 posts |
Agreed. In some cases you may even find orphaned bits of code that are being compiled but never used, e.g. I managed to find a few pre-HAL bits of code that were being compiled into the Kernel. |
Steve Revill (20) 1361 posts |
In some cases, there may just be a reason why we’d want to keep some crusty old conditionally-compiled/-assembled code – so if you’re really unsure, drop an email to code@riscosopen.org before taking the plunge and deleting lots of stuff. I think you’re safe removing Arthur vintage code! |