4 ms·
Python and Perl were not backwards compatible with anything when they were released. Perl 5 (and older) was highly backwards compatible from a programmer stand
by stcredzero 11y ago
Python and Perl were not backwards compatible with anything when they were released.
Perl 5 (and older) was highly backwards compatible from a programmer standpoint. Much of Perl is an agglomeration of preexisting Unix command line tools and little languages into one language.
- pcwalton 11y agoWell, it's closest semantically to awk, but awk is not syntactically compatible with Perl [1]. That's pretty similar to the situation with Rust and C++: semantically compatible but not syntactically compatible. [1]: http://www.arl.wustl.edu/projects/fpx/references/perl/learn/ch18_01.htm http://www.arl.wustl.edu/projects/fpx/references/perl/learn/...
- stcredzero 11y ago"semantically compatible but not syntactically compatible" would have been a more impressive way of expressing it. If Rust is highly semantically compatible with C++, then automated porting of C++ to Rust isn't such a far-out idea.
- pcwalton 11y agoDefinitely it'd be interesting. But I feel like such a thing is going to have the same issues I worry about with the ISO Core C++ lifetime checker: existing C++ code just isn't designed for lifetimes, so you will have to rework the logic a lot to get the static analysis to pass. When you have that much manual intervention, I wonder whether you're porting or really just rewriting—and if you're rewriting, syntactic compatibility doesn't matter so much.