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

Prefixing builtins with std:: #9

Open
kgabis opened this issue Aug 28, 2021 · 1 comment
Open

Prefixing builtins with std:: #9

kgabis opened this issue Aug 28, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@kgabis
Copy link
Owner

kgabis commented Aug 28, 2021

Hi,
I'm considering prefixing builtins with std:: prefix, so instead of len and array one would write std::len and std::array. Why? Because there's a lot of keywords used up by builtins so it's quite easy to get a name collision for popular names (len, array, values, etc.). At the same time I want to add using (similar to c++ using namespace) to make converting existing code easier. Alternatively I might prefix functions with context dependent prefix, for instance values would become map::values, sqrt becoming math::sqrt. Since it's quite intrusive I wanted to ask users for opinion.

@kgabis kgabis added the enhancement New feature or request label Aug 28, 2021
@darltrash
Copy link

I think this is overall a good idea, and I think it'd also be useful to have an "using" keyword for "unrolling" a namespace into the local namespace

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

No branches or pull requests

2 participants