Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Conversion of most C files to C++ #1203
5 times, most recently
Dec 18, 2018
left a comment
I am surprised that it didn't take more to make this change. Apart from one in-lined comnent I have nothing with regards to the actual changes you have made in this PR. I do however have a two additional related points that I think is worth considering:
1. Re-organize files in
I guess we should since we have already agreed that C++ code follows the format defined in
@kbevers I recommend leaving the geodesic routines in PROJ as is for
However... I worry that the conversion of PROJ to C++ will cause
A big advantage of the current C-based PROJ is that lots of other
The problem becomes acute on Windows platforms. The current PROJ
I'm sorry that I haven't been keeping track of the discussion leading up
Don't be sorry! Everything has been moving quite fast for the last six months and it is certainly hard to keep up to date with everything.
Your concerns has mostly been discussed before but that doesn't mean they are not valid. @rouault's ISO19111 work more or less requires an object oriented programming language. At least from a practical point of view (sure you could do the same in C, but not as simple, safe or fast as doing it in C++). We are of course still exposing the API in C header so it should still be straight forward to use the library. We loose the projects that are inclined to incorporate the PROJ codebase in their own that require C code only. The changes in this PR doesn't make any difference in that regard, as that constraint was already broken a few months ago when the first ISO19111 code was merged. We have touched on this in previous discussion and came to the conclusion that this was a loss that we would have to accept. It shouldn't affect too many projects I hope, especially since most package managers tend to link to the distributed version of PROJ and not the project-specific version that may be included in a source distribution of a given software package.
Regarding compilers on Windows, the most recent version of Visual Studio is freely available for open source usage so this shouldn't really be a big issue on that platform. Users that for some reason can't use a modern compiler can probably also live with an older version of PROJ.
Right. We shall do that then. Should you not wish to maintain two versions of your code in the future at least you have the option to use the C++ instead.
Just for the fun of it, I have run
My initial reaction is that it is not too bad but clang-format obscures some larger comment sections. There may be ways to get around that.