Re: [GRASS-dev] Min. req. of programming language standard support, GRASS GIS 8
Am 31. Januar 2021 22:15:53 MEZ schrieb Markus Metz : >On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert < >mlenn...@club.worldonline.be> wrote: >> >> >> >> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz < >markus.metz.gisw...@gmail.com>: >> >Hi Huidae, >> > >> >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho 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 grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Min. req. of programming language standard support, GRASS GIS 8
On Sat, Jan 30, 2021 at 5:13 AM Vaclav Petras wrote: > > > > On Fri, Jan 29, 2021 at 5:20 PM Moritz Lennert < mlenn...@club.worldonline.be> wrote: >> >> >> >> Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz < markus.metz.gisw...@gmail.com>: >> > >> >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 grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Min. req. of programming language standard support, GRASS GIS 8
On Fri, Jan 29, 2021 at 11:19 PM Moritz Lennert < mlenn...@club.worldonline.be> wrote: > > > > Am 29. Januar 2021 20:54:06 GMT+00:00 schrieb Markus Metz < markus.metz.gisw...@gmail.com>: > >Hi Huidae, > > > >On Thu, Jan 28, 2021 at 6:30 PM Huidae Cho 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 grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev