On 10/12/23 11:35, Gavin Smith wrote:
Calling [using Perl] a "mistake" is a very strong statement!  Why do you say 
that?
Surely texi2any 7.0.3 (2023) is more functional than makeinfo 4.13 (2008) was.

That is not a meaningful comparison. The question is: If we had re-written
makeinfo/texi2any using C++ rather than Perl there is all reason to
believe it would have been similarly functional at this point.

The most obvious reason Perl was the wrong choice was performance: As you
recently mentioned some people are still using the old pre-Perl tools
for that reason. And this is after years of tuning the Perl code.

Another problem with Perl is that was a relatively obscure language,
in that not many people had much experience writing big complicated
programs using Perl. And that has gotten worse in the intervening years.
A related issue is tooling: There is a lot of available and up-to-date
tooling for C++, including gdb.

I'm not much of a fan of C++ tbh.

I have a lot of C++ experience, and I am a big fan. For almost any program
where C might be a reasonable choice, C++ is likely to be a better choice.
C++ is admittedly a big complicated language - but if you focus on
C and add classes, methods, and inheritance it's not very complicated
and it's already a big win over C. Memmory management (RAII) is also easier
and less error-prone:
https://learn.microsoft.com/en-us/cpp/cpp/object-lifetime-and-resource-management-modern-cpp?view=msvc-170

It is much easier to make a large C++ program well-structured and maintainable:
Classes help immeasurably, as do namespaces.
--
        --Per Bothner
p...@bothner.com   http://per.bothner.com/

Reply via email to