<div dir="ltr"><div>Hi all,</div><div><br></div><div>regarding C, there is no need to modernize the code base because the current C code written for C89 compiles just fine with newer standards which are backwards compatible it seems. The question is if we allow features from a newer C standard, say C99, to be included in the code base. In fact, a few C99 features (supported by gnu89) have already sneaked into the GRASS C code base. I am opting to allow C99 features.<br></div><div><br></div><div>Regarding C++, it's a bit more difficult because apparently C++ standards are not fully backwards compatible. We had corresponding problems with C++ code in GRASS previously and fixed these problems when they arose.</div><div><br></div><div>Markus M</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 3:33 PM Huidae Cho <<a href="mailto:grass4u@gmail.com">grass4u@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Nicklas,</div><div><br></div><div>Thanks for your suggestions. As far as I know, C code "is written in portable ANSI-C and is fully POSIX compliant" [1] (C89 or C90?, rather old standards, I know, but GRASS itself is old and predates both standards) and the minimum "recommended" version of Python going forward is 3.5 [2]. I don't know about C++, but there are not many modules written in it. Modernizing the current code base to a newer C standard would be great though.</div><div><br></div><div>Best,</div><div>Huidae<br></div><div><br></div><div>[1] <a href="https://old.grass.osgeo.org/screenshots/platforms/" target="_blank">https://old.grass.osgeo.org/screenshots/platforms/</a></div><div>[2] <a href="https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html" target="_blank">https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Devs!<br>
<br>
As a relatively new member of the GRASS GIS dev community, I have had to search for information on mailing lists, old trac comments etc. regarding coding practice and in particular minimum programming language standard support. Ending up in not entirely conclusive understanding. Up until now, I have been mostly involved in Python development and I’m still not absolutely certain, although I assume 3.5 is minimum version. And I’m not alone, see e.g. [1].<br>
<br>
Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].<br>
<br>
I would be great if there were a (one) place where the min support of Python version, C (C89, C99, C11, C17…) and C++ (C++03, C++11, C++14 …) standard is stated -- loud and clear. Obviously, there has to be a consensus in the community on these matters for that to happen. Such a statement will also have to be revised now and then. (A related question is also whether or not to support 32 bit, which I know have been raised recently).<br>
<br>
I’d appreciate your opinion is on this issue!<br>
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:<br>
- Python 3.7<br>
- C11<br>
- C++11<br>
<br>
<br>
Best regards,<br>
Nicklas<br>
<br>
<br>
<br>
[1] <a href="https://github.com/OSGeo/grass/issues/1241" rel="noreferrer" target="_blank">https://github.com/OSGeo/grass/issues/1241</a><br>
[2] <a href="https://github.com/OSGeo/grass/issues/1247" rel="noreferrer" target="_blank">https://github.com/OSGeo/grass/issues/1247</a><br>
[3] <a href="https://github.com/OSGeo/grass/pull/1256" rel="noreferrer" target="_blank">https://github.com/OSGeo/grass/pull/1256</a><br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><div><div dir="ltr">Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大</div><div dir="ltr">GRASS GIS Developer</div><div><a href="https://idea.isnew.info" target="_blank">https://idea.isnew.info</a><br></div></div></span></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</blockquote></div>