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

C++ mode in cise #996

Open
shirok opened this issue Mar 10, 2024 · 0 comments
Open

C++ mode in cise #996

shirok opened this issue Mar 10, 2024 · 0 comments

Comments

@shirok
Copy link
Owner

shirok commented Mar 10, 2024

We added cise macros for C++ new and delete, but that can break existing CiSE code that uses these words as identifiers.

It is easy to workaround by changing the existing code, but it's not desirable for the backward compatibility.

We can make CiSE aware of whether it is dealing with C or C++, so that we can switch handling of C++-specific words.

Choices:

  • Just add a parameter to tell it's C++ mode or not. Easy, but somewhat ad-hocy.
  • Since Global CiSE macros are stored in initial <cise-ambient>, we can provide multiple default ambients, one for C and one for C++. This has the advantage that we can easily add support of C-like languages (e.g. JavaScript) later.
  • Name the macros specially, e.g. .new and .delete. We don't need the switch.
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

1 participant