Min. req. of programming language standard support, GRASS GIS 8

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
49 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Min. req. of programming language standard support, GRASS GIS 8

Grass - Dev mailing list
Dear Devs!

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].

Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].

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).

I’d appreciate your opinion is on this issue!
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
- Python 3.7
- C11
- C++11


Best regards,
Nicklas



[1] https://github.com/OSGeo/grass/issues/1241
[2] https://github.com/OSGeo/grass/issues/1247
[3] https://github.com/OSGeo/grass/pull/1256
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Huidae Cho
Nicklas,

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.

Best,
Huidae



On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
Dear Devs!

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].

Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].

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).

I’d appreciate your opinion is on this issue!
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
- Python 3.7
- C11
- C++11


Best regards,
Nicklas



[1] https://github.com/OSGeo/grass/issues/1241
[2] https://github.com/OSGeo/grass/issues/1247
[3] https://github.com/OSGeo/grass/pull/1256
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev


--
Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
GRASS GIS Developer

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
Hi all,

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.

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.

Markus M


On Thu, Jan 28, 2021 at 3:33 PM Huidae Cho <[hidden email]> wrote:
Nicklas,

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.

Best,
Huidae



On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
Dear Devs!

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].

Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].

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).

I’d appreciate your opinion is on this issue!
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
- Python 3.7
- C11
- C++11


Best regards,
Nicklas



[1] https://github.com/OSGeo/grass/issues/1241
[2] https://github.com/OSGeo/grass/issues/1247
[3] https://github.com/OSGeo/grass/pull/1256
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev


--
Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
GRASS GIS Developer
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Huidae Cho
Markus,

I think we have to think about what benefits it would bring to us by modernizing C code. Probably, not much at all. Personally, I would keep it as is because the minimum set of anything (e.g., ANSI C with no new features) would probably be more portable, I believe. In other words, what are we missing from C99?

Regards,
Huidae

On Thu, Jan 28, 2021 at 12:19 PM Markus Metz <[hidden email]> wrote:
Hi all,

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.

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.

Markus M


On Thu, Jan 28, 2021 at 3:33 PM Huidae Cho <[hidden email]> wrote:
Nicklas,

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.

Best,
Huidae



On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
Dear Devs!

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].

Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].

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).

I’d appreciate your opinion is on this issue!
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
- Python 3.7
- C11
- C++11


Best regards,
Nicklas



[1] https://github.com/OSGeo/grass/issues/1241
[2] https://github.com/OSGeo/grass/issues/1247
[3] https://github.com/OSGeo/grass/pull/1256
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev


--
Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
GRASS GIS Developer
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev


--
Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
GRASS GIS Developer

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Maris Nartiss
Our C code base de facto is not C90. I just run clean compilation with
-Wall -Wextra -pedantic -std=C90 -g -O2 and it generated 405
non-unique ISO C warnings. In comparison C99 and C17 gives 1274
warnings. Compiling with gnu90 and gnu17 gives more warnings.
I guess some of gnu90 warnings will go away when PRs dealing with
compiler warnings will be merged, but many are to stay (long long,
%lf, __func__, variable length arrays). Most of warnings are just
harmless (C++ comments in C code), although some of them are not
(sensu strict C90 conformance e.g. assignment between function pointer
and ‘void *’).

Thus question is – C99 or C17 (as I understood, C11 is not worth as
C17 just relaxes some C11 requirements).
As I am not that strong in C standards, no recommendation from my
side, but can anyone name a platform that is expected to run G8 and
does not have C11/C17 compiler?

In my opinion for G8 we should drop GDAL < 3, PROJ < 6 and C < 11.
Yes, that would reduce our bragging potential as GRASS will not run on
PDP any more, but lets be realistic here on our expectations.

At the end as this seems to be a bit more of political than technical
issue, I would suggest the new PSC to come up with clarification on
our position regarding G8.

Māris.
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Anna Petrášová
In reply to this post by Grass - Dev mailing list


On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
Dear Devs!

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].

Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].

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).

I’d appreciate your opinion is on this issue!
Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
- Python 3.7
- C11
- C++11


Best regards,
Nicklas


Regarding Python, not sure if we shouldn't set 3.6 as minimum for G8, it is still used e.g. in Ubuntu 18. Any reason to set 3.7 as minimum, some specific features we would want to use?

Anna



[1] https://github.com/OSGeo/grass/issues/1241
[2] https://github.com/OSGeo/grass/issues/1247
[3] https://github.com/OSGeo/grass/pull/1256
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
In reply to this post by Huidae Cho
Hi Huidae,

On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
>
> Markus,
>
> I think we have to think about what benefits it would bring to us by modernizing C code. Probably, not much at all. Personally, I would keep it as is because the minimum set of anything (e.g., ANSI C with no new features) would probably be more portable, I believe. In other words, what are we missing from C99?

as I mentioned, there is no need to modernize the GRASS C code. The question is if we officially allow C99 features.

For example a number of useful math-related functions and macros are only available with C99. See /usr/include/math.h on your system and search for C99. Also a number of features related to data types, particularly for various int datatypes (stdint.h), become available with C99. And the geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ versions, C99 is a requirement.

Markus M

>

> Regards,
> Huidae
>
> On Thu, Jan 28, 2021 at 12:19 PM Markus Metz <[hidden email]> wrote:
>>
>> Hi all,
>>
>> 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.
>>
>> 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.
>>
>> Markus M
>>
>>
>> On Thu, Jan 28, 2021 at 3:33 PM Huidae Cho <[hidden email]> wrote:
>>>
>>> Nicklas,
>>>
>>> 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.
>>>
>>> Best,
>>> Huidae
>>>
>>> [1] https://old.grass.osgeo.org/screenshots/platforms/
>>> [2] https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html
>>>
>>>
>>> On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
>>>>
>>>> Dear Devs!
>>>>
>>>> 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].
>>>>
>>>> Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].
>>>>
>>>> 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).
>>>>
>>>> I’d appreciate your opinion is on this issue!
>>>> Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
>>>> - Python 3.7
>>>> - C11
>>>> - C++11
>>>>
>>>>
>>>> Best regards,
>>>> Nicklas
>>>>
>>>>
>>>>
>>>> [1] https://github.com/OSGeo/grass/issues/1241
>>>> [2] https://github.com/OSGeo/grass/issues/1247
>>>> [3] https://github.com/OSGeo/grass/pull/1256
>>>> _______________________________________________
>>>> grass-dev mailing list
>>>> [hidden email]
>>>> https://lists.osgeo.org/mailman/listinfo/grass-dev
>>>
>>>
>>>
>>> --
>>> Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
>>> GRASS GIS Developer
>>> https://idea.isnew.info
>>> _______________________________________________
>>> grass-dev mailing list
>>> [hidden email]
>>> https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
>
> --
> Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
> GRASS GIS Developer
> https://idea.isnew.info
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Moritz Lennert


Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <[hidden email]>:

>Hi Huidae,
>
>On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
>>
>> Markus,
>>
>> I think we have to think about what benefits it would bring to us by
>modernizing C code. Probably, not much at all. Personally, I would keep it
>as is because the minimum set of anything (e.g., ANSI C with no new
>features) would probably be more portable, I believe. In other words, what
>are we missing from C99?
>
>as I mentioned, there is no need to modernize the GRASS C code. The
>question is if we officially allow C99 features.
>
>For example a number of useful math-related functions and macros are only
>available with C99. See /usr/include/math.h on your system and search for
>C99. Also a number of features related to data types, particularly for
>various int datatypes (stdint.h), become available with C99. And the
>geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
>versions, C99 is a requirement.


If proj requires it, doesn't it automatically become a requirement for GRASS as well ?

Moritz
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

wenzeslaus


On Fri, Jan 29, 2021 at 5:20 PM Moritz Lennert <[hidden email]> wrote:


Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <[hidden email]>:
>
>For new PROJ
>versions, C99 is a requirement.


If proj requires it, doesn't it automatically become a requirement for GRASS as well ?

That's a good point. We have the same situation with GDAL. It requires C++11 [1]. Although this may not set the requirement absolutely, it sets it practically.

Additionally, increasing the minimum for C let's say to C17,  may allow increasing the minimum for C++ because practically there is no compiler which would support one and not the other, but that depends on the particular combination.

In CI, I have set the GCC compilation tests only for C99 and above and C++11 and above [2] (i.e., not requiring anything below that). However, note that the C is GNU C, not ISO (which we currently don't conform to). The "pedantic" keeping of the standard fails for both C and C++ (and thus it is not currently checked in the CI).


_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

wenzeslaus


On Fri, Jan 29, 2021 at 11:13 PM Vaclav Petras <[hidden email]> wrote:


On Fri, Jan 29, 2021 at 5:20 PM Moritz Lennert <[hidden email]> wrote:


Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <[hidden email]>:
>
>For new PROJ
>versions, C99 is a requirement.


If proj requires it, doesn't it automatically become a requirement for GRASS as well ?

That's a good point. We have the same situation with GDAL. It requires C++11 [1]. Although this may not set the requirement absolutely, it sets it practically.

Additionally, increasing the minimum for C let's say to C17,  may allow increasing the minimum for C++ because practically there is no compiler which would support one and not the other, but that depends on the particular combination.

In CI, I have set the GCC compilation tests only for C99 and above and C++11 and above [2] (i.e., not requiring anything below that). However, note that the C is GNU C, not ISO (which we currently don't conform to). The "pedantic" keeping of the standard fails for both C and C++ (and thus it is not currently checked in the CI).

Hm, actually, the original commit message [3] discusses this including some additional details such as C17 not being available in Ubuntu 18.04.

 

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
In reply to this post by Moritz Lennert


On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert <[hidden email]> wrote:

>
>
>
> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <[hidden email]>:
> >Hi Huidae,
> >
> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
> >>
> >> Markus,
> >>
> >> I think we have to think about what benefits it would bring to us by
> >modernizing C code. Probably, not much at all. Personally, I would keep it
> >as is because the minimum set of anything (e.g., ANSI C with no new
> >features) would probably be more portable, I believe. In other words, what
> >are we missing from C99?
> >
> >as I mentioned, there is no need to modernize the GRASS C code. The
> >question is if we officially allow C99 features.
> >
> >For example a number of useful math-related functions and macros are only
> >available with C99. See /usr/include/math.h on your system and search for
> >C99. Also a number of features related to data types, particularly for
> >various int datatypes (stdint.h), become available with C99. And the
> >geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
> >versions, C99 is a requirement.
>
>
> If proj requires it, doesn't it automatically become a requirement for GRASS as well ?

No, because the code base of other libs might have completely different compile requirements. A software can use functions and libs of other software packages, but does not need to follow the compile standards of those other software packages, because they are compiled independently.

Markus M


_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
In reply to this post by wenzeslaus


On Sat, Jan 30, 2021 at 5:13 AM Vaclav Petras <[hidden email]> wrote:

>
>
>
> On Fri, Jan 29, 2021 at 5:20 PM Moritz Lennert <[hidden email]> wrote:
>>
>>
>>
>> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <[hidden email]>:
>> >
>> >For new PROJ
>> >versions, C99 is a requirement.
>>
>>
>> If proj requires it, doesn't it automatically become a requirement for GRASS as well ?
>
>
> That's a good point. We have the same situation with GDAL. It requires C++11 [1]. Although this may not set the requirement absolutely, it sets it practically.

For GDAL, not for GRASS. GRASS is compiled independently of GDAL, it just makes use of GDAL fns that are compiled with their own set of requirements.

Markus M

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Moritz Lennert
In reply to this post by Markus Metz-3


Am 31. Januar 2021 22:15:53 MEZ schrieb Markus Metz <[hidden email]>:

>On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert <
>[hidden email]> wrote:
>>
>>
>>
>> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <
>[hidden email]>:
>> >Hi Huidae,
>> >
>> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
>> >>
>> >> Markus,
>> >>
>> >> I think we have to think about what benefits it would bring to us by
>> >modernizing C code. Probably, not much at all. Personally, I would keep
>it
>> >as is because the minimum set of anything (e.g., ANSI C with no new
>> >features) would probably be more portable, I believe. In other words,
>what
>> >are we missing from C99?
>> >
>> >as I mentioned, there is no need to modernize the GRASS C code. The
>> >question is if we officially allow C99 features.
>> >
>> >For example a number of useful math-related functions and macros are only
>> >available with C99. See /usr/include/math.h on your system and search for
>> >C99. Also a number of features related to data types, particularly for
>> >various int datatypes (stdint.h), become available with C99. And the
>> >geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
>> >versions, C99 is a requirement.
>>
>>
>> If proj requires it, doesn't it automatically become a requirement for
>GRASS as well ?
>
>No, because the code base of other libs might have completely different
>compile requirements. A software can use functions and libs of other
>software packages, but does not need to follow the compile standards of
>those other software packages, because they are compiled independently.
>

Thanks for the clarification.

In light of that I agree that we should choose the oldest standard possible, unless we _really_ need something only present in a more recent version.

@those who want to use more recent standards: what are your reasons for that ?

Moritz
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Grass - Dev mailing list
In reply to this post by Grass - Dev mailing list


> On 1 Feb 2021, at 08:56, Moritz Lennert <[hidden email]> wrote:
>
> Thanks for the clarification.
>
> In light of that I agree that we should choose the oldest standard possible, unless we _really_ need something only present in a more recent version.
>
> @those who want to use more recent standards: what are your reasons for that ?
>
> Moritz



The immediate reason for me bringing this issue up to the ml, was the question on whether to include the standard header <inttypes.h> (introduced with C99) for using printf format specifier. Something that would simplify portability.

It is my general impression that the newer standards, apart from adding new features to the language, make it somewhat stricter (thus probably safer) and actually improves portability.

The portability issue from our point of view, I presume, is rather the degree of the compilers’ (and platforms’) support of the standards. On this field, there has been major progress since last time this was discussed (correct me if I’m mistaken) some 10 years ago and especially in the last couple of years.
In particular, MSVC is notoriously lagging in support for new C standards, with Visual Studio 2013 giving only partial support of C99 [1]. Wheras gcc added "substantially complete support” for C99 with GCC 4.5 [2] and for C11 as of 4.9 [3].
Last year support for (required features of) C11 and C17 was added with Visual Studio 2019 version 16.8 [4]. Clang, being a relatively new contestant, supports most of latest standards [5].

As noted by Markus and Māris, present code base doesn’t conform to C89/C90. I might add the use of inline to the list of non-C89. Inlines is a feature added with C99 (although GNU has it as an extension to C89 [6]).
In light of this fact alone, I think it would be good to reconsider recommendations/directions on C standard requirements. I can hardly imagine someone take the time to back-port relevant code just for the sake of it. If C89 doesn’t cut it, then what will? It feels natural to then jump to the next standard, C99.

The crux of the matter is that changes from C99 to C11 aren't cumulative, but in practice (at least partly) made C11 more lax. Some features introduced as mandatory in C99 were made optional in C11. This is, I suppose, the reason for the still only partly supported C99 in msvc, whereas proper support of C11 and C17 was added.

On the other end of the line of standards, there is the C17, which doesn’t bring any news compared to C11, but is rather a bug fix for the former [7]. Code written for C11 will work in C17 mode and the other way around, but the actual compiled code depends on the compiler. In order not to potentially exclude max. C11 compatible compilers (e.g. 4.9 > GCC < 8.1), I’d say C11 support is preferable to C17.

In short, there is a lot to take into consideration. For me, C11 (perhaps with mandatory feature support only) still seem to be the best candidate. What platforms, compilers being used for future development of GRASS do not meet that requirement?
I’d like to emphasise, setting new requirements for C code is first and foremost important for new or otherwise updated code. No need to “modernise” the whole code base.

Regarding C++. I don’t know to what extent existing code comply to any standard. I do know that at least PROJ, GEOS, GDAL adhere to C++11, which is a de facto standard in most open source projects. If we would set a requirement and I believe we should, C++11 should be the one at this date.


GRASS did not only survive but also evolved beautifully, through decades of tech changes, by making strategic moves forward at the right time. I agree with Māris that, in the end, this is a question for PSC.


Cheers,
Nicklas



[1] https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/
[2] https://gcc.gnu.org/c99status.html
[3] https://gcc.gnu.org/wiki/C11Status
[4] https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/
[5] https://clang.llvm.org/compatibility.html
[6] https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Inline.html
[7] https://gcc.gnu.org/legacy-ml/gcc-patches/2017-10/msg02121.html


_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
In reply to this post by Moritz Lennert
A pity that Nicklas did not answer in this thread, see his answer in https://lists.osgeo.org/pipermail/grass-dev/2021-February/094913.html

I have not studied the different C standards and the state of their implementation in different compilers and their different versions in depth, and thus appreciate very much the summary of Nicklas!

IIUC, Nicklas recommends to allow C11 standard features in GRASS C code, with no need to change the current code base, and all compilers in all supported platforms apparently support C11.

+1 from me, as long as all stock compilers on all supported platforms support C11 

Markus M


On Mon, Feb 1, 2021 at 8:56 AM Moritz Lennert <[hidden email]> wrote:

>
>
>
> Am 31. Januar 2021 22:15:53 MEZ schrieb Markus Metz <[hidden email]>:
> >On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert <
> >[hidden email]> wrote:
> >>
> >>
> >>
> >> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <
> >[hidden email]>:
> >> >Hi Huidae,
> >> >
> >> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
> >> >>
> >> >> Markus,
> >> >>
> >> >> I think we have to think about what benefits it would bring to us by
> >> >modernizing C code. Probably, not much at all. Personally, I would keep
> >it
> >> >as is because the minimum set of anything (e.g., ANSI C with no new
> >> >features) would probably be more portable, I believe. In other words,
> >what
> >> >are we missing from C99?
> >> >
> >> >as I mentioned, there is no need to modernize the GRASS C code. The
> >> >question is if we officially allow C99 features.
> >> >
> >> >For example a number of useful math-related functions and macros are only
> >> >available with C99. See /usr/include/math.h on your system and search for
> >> >C99. Also a number of features related to data types, particularly for
> >> >various int datatypes (stdint.h), become available with C99. And the
> >> >geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
> >> >versions, C99 is a requirement.
> >>
> >>
> >> If proj requires it, doesn't it automatically become a requirement for
> >GRASS as well ?
> >
> >No, because the code base of other libs might have completely different
> >compile requirements. A software can use functions and libs of other
> >software packages, but does not need to follow the compile standards of
> >those other software packages, because they are compiled independently.
> >
>
> Thanks for the clarification.
>
> In light of that I agree that we should choose the oldest standard possible, unless we _really_ need something only present in a more recent version.
>
> @those who want to use more recent standards: what are your reasons for that ?
>
> Moritz
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Maris Nartiss
In reply to this post by Moritz Lennert
2021-02-01 9:56 GMT+02:00, Moritz Lennert <[hidden email]>:
>
> @those who want to use more recent standards: what are your reasons for that
> ?

Many of GRASS contributors are programmers by chance and not by trade.
(I still consider it to be a miracle that I can spew out reasonably
working C code) A lot of online tutorials and SO answers do not
clarify if features presented in examples are confirming to a certain
standard. Thus demanding conformance to an older C standard would just
increase extra burden on PR reviewers to check conformance and provide
guidance on changing code to confirm with an older C standard.
Automatic checks will not generate alternative versions of code to
comply with older standards. As we have only a few C folks who can
write really advanced code, I would love to see them developing new
exciting features instead of guarding code base from code confirming
to more recent C standard.

Just my 0.02,
Māris.
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Grass - Dev mailing list
In reply to this post by Anna Petrášová





On Friday, 29 January 2021, 18:50:34 CET, Anna Petrášová <[hidden email]> wrote:







On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:

> Dear Devs!
>
> 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].
>
> Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].
>
> 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).
>
> I’d appreciate your opinion is on this issue!
> Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
> - Python 3.7
> - C11
> - C++11
>
>
> Best regards,
> Nicklas
>

Regarding Python, not sure if we shouldn't set 3.6 as minimum for G8, it is still used e.g. in Ubuntu 18. Any reason to set 3.7 as minimum, some specific features we would want to use?

Anna



Well, I don’t have a very strong opinion regarding 3.7, but personally I’d say 3.6 is an absolute minimum. I presume, for example, most of us would prefer to use f-strings for string formatting.


On the other hand, 3.6 will reach end-of-support at the end of this year right after its 5th birthday party and the support for data classes in 3.7 may potentially offer intriguing applications in G8.

Ubuntu 18 has Python 3.6 and Debian 9 has Python 3.5! What will make the lowest common denominator? Debian 10 and Ubuntu 20 actually supports Python 3.7 and 3.8 respectively. Forgive me if I’m ignorant, but isn’t it possible to upgrade Python version on Ubuntu? Or is it just a pain with package dependencies? Relying on default Python has never/rarely been a luxury for other platforms.

That being said, I think the most important part of this is that the community make a clear decision on min. supported Python version.


Best,
Nicklas
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Huidae Cho
In reply to this post by Markus Metz-3
Thanks Nicklas for the great summary! That helped a lot.

I was wondering if we have a list of all supported platforms somewhere? We have official downloads for Linux, Mac, and Windows. Are these three only "officially" supported platforms? I know GRASS is compilable on FreeBSD [1] and maybe (Open|Net)BSD. Is that it? Minix3 supports GDAL 1.11.3, PROJ 4.9.2, GEOS 3.5.0, and GCC 6.2.0 [2]. I know... they are a little behind.

Since we cannot (or will be difficult to) go back once we move to a newer C standard, I think we need to discuss what platforms we want to support officially or unofficially (?) first. Is [3] or [4] (GRASS 6.3) still valid? Has anyone tried all or some of those platforms recently (Sun Solaris (SPARC/Intel), Silicon Graphics Irix, HP-UX, DEC-Alpha, AIX, BSD, iPAQ/Linux and other UNIX compliant platforms)? I think at some point this list was removed from a release announcement. Maybe, we are being more realistic because many of these platforms are now irrelevant or we just don't have enough resources or interest to maintain such a list of supported platforms anymore?

Best,
Huidae



On Mon, Feb 1, 2021 at 4:25 PM Markus Metz <[hidden email]> wrote:
A pity that Nicklas did not answer in this thread, see his answer in https://lists.osgeo.org/pipermail/grass-dev/2021-February/094913.html

I have not studied the different C standards and the state of their implementation in different compilers and their different versions in depth, and thus appreciate very much the summary of Nicklas!

IIUC, Nicklas recommends to allow C11 standard features in GRASS C code, with no need to change the current code base, and all compilers in all supported platforms apparently support C11.

+1 from me, as long as all stock compilers on all supported platforms support C11 

Markus M


On Mon, Feb 1, 2021 at 8:56 AM Moritz Lennert <[hidden email]> wrote:

>
>
>
> Am 31. Januar 2021 22:15:53 MEZ schrieb Markus Metz <[hidden email]>:
> >On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert <
> >[hidden email]> wrote:
> >>
> >>
> >>
> >> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <
> >[hidden email]>:
> >> >Hi Huidae,
> >> >
> >> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
> >> >>
> >> >> Markus,
> >> >>
> >> >> I think we have to think about what benefits it would bring to us by
> >> >modernizing C code. Probably, not much at all. Personally, I would keep
> >it
> >> >as is because the minimum set of anything (e.g., ANSI C with no new
> >> >features) would probably be more portable, I believe. In other words,
> >what
> >> >are we missing from C99?
> >> >
> >> >as I mentioned, there is no need to modernize the GRASS C code. The
> >> >question is if we officially allow C99 features.
> >> >
> >> >For example a number of useful math-related functions and macros are only
> >> >available with C99. See /usr/include/math.h on your system and search for
> >> >C99. Also a number of features related to data types, particularly for
> >> >various int datatypes (stdint.h), become available with C99. And the
> >> >geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
> >> >versions, C99 is a requirement.
> >>
> >>
> >> If proj requires it, doesn't it automatically become a requirement for
> >GRASS as well ?
> >
> >No, because the code base of other libs might have completely different
> >compile requirements. A software can use functions and libs of other
> >software packages, but does not need to follow the compile standards of
> >those other software packages, because they are compiled independently.
> >
>
> Thanks for the clarification.
>
> In light of that I agree that we should choose the oldest standard possible, unless we _really_ need something only present in a more recent version.
>
> @those who want to use more recent standards: what are your reasons for that ?
>
> Moritz

--
Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
GRASS GIS Developer

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Anna Petrášová
In reply to this post by Grass - Dev mailing list


On Tue, Feb 2, 2021 at 11:20 AM Nicklas Larsson <[hidden email]> wrote:





On Friday, 29 January 2021, 18:50:34 CET, Anna Petrášová <[hidden email]> wrote:







On Thu, Jan 28, 2021 at 4:28 AM Nicklas Larsson via grass-dev <[hidden email]> wrote:
> Dear Devs!
>
> 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].
>
> Now, I’ve encountered a similar dilemma with C standard support, attempting to address compiler warnings [2], in particular with the PR #1256 [3].
>
> 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).
>
> I’d appreciate your opinion is on this issue!
> Let me put up a a suggestion for min. req. for coming GRASS GIS 8 as a starting point of discussion:
> - Python 3.7
> - C11
> - C++11
>
>
> Best regards,
> Nicklas
>

Regarding Python, not sure if we shouldn't set 3.6 as minimum for G8, it is still used e.g. in Ubuntu 18. Any reason to set 3.7 as minimum, some specific features we would want to use?

Anna

>  
>
> [1] https://github.com/OSGeo/grass/issues/1241
> [2] https://github.com/OSGeo/grass/issues/1247
> [3] https://github.com/OSGeo/grass/pull/1256
>
> _______________________________________________
> grass-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>



Well, I don’t have a very strong opinion regarding 3.7, but personally I’d say 3.6 is an absolute minimum. I presume, for example, most of us would prefer to use f-strings for string formatting.

yes, f-strings are nice although they have limitations for using with translatable strings (Vashek can expand on that) 


On the other hand, 3.6 will reach end-of-support at the end of this year right after its 5th birthday party and the support for data classes in 3.7 may potentially offer intriguing applications in G8.

I noticed the data classes as well. Given 3.6 is reaching end-of-support soon, I agree with 3.7 for G8. I assume grass would be compatible with 3.6 for a while anyway.


Ubuntu 18 has Python 3.6 and Debian 9 has Python 3.5! What will make the lowest common denominator? Debian 10 and Ubuntu 20 actually supports Python 3.7 and 3.8 respectively. Forgive me if I’m ignorant, but isn’t it possible to upgrade Python version on Ubuntu? Or is it just a pain with package dependencies? Relying on default Python has never/rarely been a luxury for other platforms.

That being said, I think the most important part of this is that the community make a clear decision on min. supported Python version.


Best,
Nicklas

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Min. req. of programming language standard support, GRASS GIS 8

Markus Metz-3
In reply to this post by Huidae Cho

On Wed, Feb 3, 2021 at 6:30 AM Huidae Cho <[hidden email]> wrote:
>
> Thanks Nicklas for the great summary! That helped a lot.
>
> I was wondering if we have a list of all supported platforms somewhere? We have official downloads for Linux, Mac, and Windows. Are these three only "officially" supported platforms? I know GRASS is compilable on FreeBSD [1] and maybe (Open|Net)BSD. Is that it? Minix3 supports GDAL 1.11.3, PROJ 4.9.2, GEOS 3.5.0, and GCC 6.2.0 [2]. I know... they are a little behind.

I think it is a bit more complicated, e.g. there is not one single Linux version. We need to make a decision not only about platforms, but also about platform versions. Traditionally, GRASS aims to be compatible with all currently supported platform versions. For RHEL, this would mean support for RHEL 7 (ignoring the extended support for RHEL 6 until 2024). For Debian, this would mean support for Stretch (Debian 9). For FreeBSD, this would mean support for FreeBSD 11.x. For Solaris, this would mean support for Solaris 11 (ignoring the extended support for Solaris 10 until 2024). I have previously tested GRASS on all these platforms, but not on all supported versions of these platforms. IMHO, it is ok if the current GRASS version is running on the current version of these OSs (RHEL, Debian, FreeBSD, Solaris) which are often used in production environments.

The derived and often more up-to-date OSs like Fedora, Ubuntu, etc. do not seem to be a problem.

Markus M

>
> Since we cannot (or will be difficult to) go back once we move to a newer C standard, I think we need to discuss what platforms we want to support officially or unofficially (?) first. Is [3] or [4] (GRASS 6.3) still valid? Has anyone tried all or some of those platforms recently (Sun Solaris (SPARC/Intel), Silicon Graphics Irix, HP-UX, DEC-Alpha, AIX, BSD, iPAQ/Linux and other UNIX compliant platforms)? I think at some point this list was removed from a release announcement. Maybe, we are being more realistic because many of these platforms are now irrelevant or we just don't have enough resources or interest to maintain such a list of supported platforms anymore?

>
> Best,
> Huidae
>
> [1] https://www.freebsd.org/cgi/man.cgi?query=index&section=3
> [2] http://www.minix3.org/pkgsrc/distfiles/local/3.4.0-2016Q3/
> [3] https://old.grass.osgeo.org/screenshots/platforms/
> [4] https://grass.osgeo.org/news/2008_04_23_announce_grass630/
>
>
> On Mon, Feb 1, 2021 at 4:25 PM Markus Metz <[hidden email]> wrote:
>>
>> A pity that Nicklas did not answer in this thread, see his answer in https://lists.osgeo.org/pipermail/grass-dev/2021-February/094913.html
>>
>> I have not studied the different C standards and the state of their implementation in different compilers and their different versions in depth, and thus appreciate very much the summary of Nicklas!
>>
>> IIUC, Nicklas recommends to allow C11 standard features in GRASS C code, with no need to change the current code base, and all compilers in all supported platforms apparently support C11.
>>
>> +1 from me, as long as all stock compilers on all supported platforms support C11
>>
>> Markus M
>>
>>
>> On Mon, Feb 1, 2021 at 8:56 AM Moritz Lennert <[hidden email]> wrote:
>> >
>> >
>> >
>> > Am 31. Januar 2021 22:15:53 MEZ schrieb Markus Metz <[hidden email]>:
>> > >On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert <
>> > >[hidden email]> wrote:
>> > >>
>> > >>
>> > >>
>> > >> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz <
>> > >[hidden email]>:
>> > >> >Hi Huidae,
>> > >> >
>> > >> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho <[hidden email]> wrote:
>> > >> >>
>> > >> >> Markus,
>> > >> >>
>> > >> >> I think we have to think about what benefits it would bring to us by
>> > >> >modernizing C code. Probably, not much at all. Personally, I would keep
>> > >it
>> > >> >as is because the minimum set of anything (e.g., ANSI C with no new
>> > >> >features) would probably be more portable, I believe. In other words,
>> > >what
>> > >> >are we missing from C99?
>> > >> >
>> > >> >as I mentioned, there is no need to modernize the GRASS C code. The
>> > >> >question is if we officially allow C99 features.
>> > >> >
>> > >> >For example a number of useful math-related functions and macros are only
>> > >> >available with C99. See /usr/include/math.h on your system and search for
>> > >> >C99. Also a number of features related to data types, particularly for
>> > >> >various int datatypes (stdint.h), become available with C99. And the
>> > >> >geographic lib in PROJ with src/geodesic.c wants C99. For new PROJ
>> > >> >versions, C99 is a requirement.
>> > >>
>> > >>
>> > >> If proj requires it, doesn't it automatically become a requirement for
>> > >GRASS as well ?
>> > >
>> > >No, because the code base of other libs might have completely different
>> > >compile requirements. A software can use functions and libs of other
>> > >software packages, but does not need to follow the compile standards of
>> > >those other software packages, because they are compiled independently.
>> > >
>> >
>> > Thanks for the clarification.
>> >
>> > In light of that I agree that we should choose the oldest standard possible, unless we _really_ need something only present in a more recent version.
>> >
>> > @those who want to use more recent standards: what are your reasons for that ?
>> >
>> > Moritz
>
>
>
> --
> Huidae Cho, Ph.D., GISP, /hidɛ t͡ɕo/, 조희대, 曺喜大
> GRASS GIS Developer
> https://idea.isnew.info
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
123