Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify and document code --- code review #786

Open
GillesDuvert opened this issue Jun 17, 2020 · 1 comment
Open

simplify and document code --- code review #786

GillesDuvert opened this issue Jun 17, 2020 · 1 comment
Labels
c++-only good first issue Good for newcomers help wanted Extra attention is needed

Comments

@GillesDuvert
Copy link
Contributor

A number of functions scattered in GDL's code more or less do the same thing and should be factorized in one place in order to be easily maintained. Especially if these functions use basic system functions that may differ with the system (macOS, unix, MSW..). And, the factorized function should be documented (with Doxygen in mind).
Take the example of strtol() . It is used in at least 4 different places, in 4 different templates functions, so potentially 4*12 or so variants, to do exactly the same thing: convert a string in a integer. Fine as long as there is no problem. But there is a problem: the function is supposed sometimes to return a byte, a long, and unsigned long64 etc, calling for differents strategies (use strtoll, strtoull..) on different architectures. Factorization is the solution. There are other examples, mostly around string manipulation, unix/windows file naming, regular expressions, array sorting...

A code review and implementation of this factorization for these (few? not sure) basic system function calls would be a very very valuable contribution from somebody willing to do it and not particularly interested in the GDL language itself.

@GillesDuvert GillesDuvert added c++-only good first issue Good for newcomers help wanted Extra attention is needed labels Jun 17, 2020
@slayoo
Copy link
Member

slayoo commented Jun 19, 2020

related: #74 (using gnulib for such logic as strtol: https://www.gnu.org/software/gnulib/manual/gnulib.html#strtol)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++-only good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants