<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Jacob, would you consider VTK to be "Modern C++"? It was designed in the 90s and I think C++11 isn't widely used (architecturally) since it was first allowed a few years ago.<br></div><div><br></div><div>I feel like changing languages (or adopting a second essential implementation language) is a significant complexity step in terms of what a new developer needs to learn to be effective and the cognitive load of reviewing. It may be worth it if there are significant benefits in safety and static analysis or if the tooling means contributors really have fewer moving parts.</div><div><br></div><div>On Sun, Jul 31, 2022, at 8:26 AM, Lisandro Dalcin wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div dir="ltr"><br></div><div><br></div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">On Sun, 31 Jul 2022 at 17:07, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div dir="ltr"><div dir="ltr">On Sun, Jul 31, 2022 at 9:06 AM Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" target="_blank">dalcinl@gmail.com</a>> wrote:<br></div><div class="qt-gmail_quote"><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div dir="ltr"><div dir="ltr">On Sun, 31 Jul 2022 at 16:41, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank">jacob.fai@gmail.com</a>> wrote:<br></div><div class="qt-gmail_quote"><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div><br></div><div>> Please don't take my words as advocacy for C++<br></div><div> <br></div><div> I’m going to pretend like I didn’t read this :)<br></div></blockquote><div><br></div><div>Whatever the final decision is, PETSc should keep providing a plain C API. C is lingua franca, C++ is not. Many other programming languages have runtime FFIs mostly based on the C ABI guarantees (Java, Python, MATLAB, Rust, Julia, etc). C++ may be great for development, but I do not consider it great for crossing language boundaries. <br></div><div><br></div><div>Maybe the right approach for petsc4py is to first get nice and modern C++ bindings implemented by wrapping the C interface. And then map these C++ bindings to Python.<br></div></div></div></blockquote><div><br></div><div>My crystal ball says that such a C++ binding would eventually be thrown away just as in the case of MPI.<br></div></div></div></blockquote><div><br></div><div>MPI C++ failed because it provided little added value. But if a PETSc C++ API would become the base of bindings for other OO languages, then there is value in maintaining these C++ bindings.<br></div><div>Furthermore, these C++ bindings could serve as the foundation for a reimplementation of PETSc in C++, if that ever happens. And that can be done gradually.<br></div><div><br></div><div>PS: Modern C++ is a great language to implement stuff. People using C++ is another story, it is like giving a machine gun to monkeys. Well, at this point, I could say exactly the same about Python. <br></div><div>My issue with C++ is not the language itself, but the lack of discipline of C++ developers. There are disastrous stories we all know well. But there are successful ones, like VTK/ParaView.<br></div></div><div><br></div><div><br></div><div>-- <br></div><div dir="ltr" class="qt-gmail_signature"><div dir="ltr"><div><div>Lisandro Dalcin<br></div><div>============<br></div><div>Senior Research Scientist<br></div><div>Extreme Computing Research Center (ECRC)<br></div><div>King Abdullah University of Science and Technology (KAUST)<br></div><div><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div></div></blockquote><div><br></div></body></html>