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

Proposal: Use C++ instead of C #9478

Open
gacholio opened this issue May 6, 2020 · 0 comments
Open

Proposal: Use C++ instead of C #9478

gacholio opened this issue May 6, 2020 · 0 comments

Comments

@gacholio
Copy link
Contributor

gacholio commented May 6, 2020

I propose we stop using .c files in OpenJ9 in favour of .cpp files. I am not proposing an actual language shift - most files would be wrapped in extern "C" rather than making them into classes. The advantages are:

  • inline variable declarations on every platform
  • inline functions are much more flexible and readable than preprocessor macros

Conversion can take place one file at a time. The majority of the work will be adding casts because C++ does not allow implicit conversion to/from void*.

Any new files should be .cpp.

@gacholio gacholio changed the title Use C++ instead of C Proposal: Use C++ instead of C May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants