On legacy code
2014-01-29 16:24:43.160893+00 by
Dan Lyke
4 comments
So over on Twitter, Jay recommended this: /.: Why Do Projects Continue To Support Old Python Releases?, which linked to this query about why projects support old Python, given that 2.4 was EOLed in 2008 and 2.6 was EOLed in October of 2013, and Rob Galankis's response, which includes some of the issues of maintaining Python in EVE online.
I think I've mentioned that I've been using a few spare cycles to rewrite the Flutterby.net static site content manager from Perl into C++, using it as a way to both refresh my C++ and to learn some of the C++11 features. After doing so much Perl, I'm really enjoying having a typed language again, getting more of the errors at compile (or syntax check) time, but it also occurred to me:
If you had to pick a language where you could still compile code from the 1970s, a language that has proven itself for long-term maintenance in complex systems, it's kinda C or C++.
[ related topics:
Interactive Drama Weblogs Perl Open Source Monty Python Python hubris
]
comments in ascending chronological order (reverse):
#Comment Re: made: 2014-01-29 23:28:02.332123+00 by:
TheSHAD0W
Having managed a Python-based project before, I can answer that question.
There are several linux projects, notably Debian, where mainline builds are mandated for some users. These builds will often have bugfixes for many packages, but version updates, especially for run-time languages like Python where they can sometimes break code, aren't permitted. Mainline BitTorrent left older Python versions behind, and my BitTornado project got quite a bit of support thanks to a few tweaks that allowed the older Python versions to keep running the code.
#Comment Re: made: 2014-01-30 05:39:32.916281+00 by:
spc476
[edit history]
Kind of C or C++.
I downloaded the source code to Viola, one of the first graphical web browsers from the very early 90s and ... wow. It barely works on a 32 bit system (and that's after cranking up the compiler warnings and fixing just the errors; there are still 2,693 warnings left to clean up) but there is NO WAY that I would trust that code base on a 64 bit system (since it makes the assumption that int==long==ptr and let's just forget that whole signed/unsigned crap while we're at it).
But at least it is runnable. I just tried compiling C code from the mid-80s and with a few tweaks here and there (ah, getstr() is just fgets() without the file, and it was using chkchr() (I think it's supposed to scan the keyboard) to seed the random number generator, and the version of rand() used took a parameter) it does run.
#Comment Re: made: 2014-01-30 13:39:30.028029+00 by:
meuon
I'm not at the C level.. but I grok the advantages of C/C++ when done well.
#Comment Re: made: 2014-02-01 08:00:29.061459+00 by:
John Anderson
FWIW, I've seen new Perl language features get shot down on p5p (the mailing list where the
people who maintain Perl talk to each other) because somebody bitched that it would break a Perl
1 script they were still using and they didn't want to rewrite it.
The only reason Perl doesn't support code from the '70s is because it didn't exist then.