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

Why C11? #33

Closed
isaachier opened this issue Mar 19, 2018 · 4 comments
Closed

Why C11? #33

isaachier opened this issue Mar 19, 2018 · 4 comments

Comments

@isaachier
Copy link
Contributor

Does this library use any C11 feature? Mostly out of curiosity, but also because people are more likely to get along with a C99 library than a C11 library (especially true on Windows from what I gather).

@dfellis
Copy link
Collaborator

dfellis commented Mar 19, 2018

On Windows you can't go with C99, you have to go all the way back to C89 if you want to use Microsoft's C compiler and not fake it as a C++ project, which we weren't willing to do.

For other platforms, we saw no problem between targeting C99 and C11, so we simply chose the later standard in case we needed things like the memory alignment directives for mobile (we didn't, but that was one of the reasons).

@isaachier
Copy link
Contributor Author

Really? I thought even Microsoft caught up to C99 by now. No worries either way, just noticed a bunch of C89 style code in here. Variable declarations at the top of the function, no use of variable length arrays (see #32) . Was wondering if it was intentional.

@dfellis
Copy link
Collaborator

dfellis commented Mar 19, 2018

@sahrk built the original core of this library, which has a loose connection to DGGRID, and that code is C89, so that's where that came from. We have refactored code and modernized it when digging into it, but we haven't attempted to systematically do so.

@isaachier
Copy link
Contributor Author

Got it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants