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

namespace of function and event #2099

Closed
pureland opened this issue Mar 30, 2017 · 3 comments
Closed

namespace of function and event #2099

pureland opened this issue Mar 30, 2017 · 3 comments
Labels
waiting for more input Issues waiting for more input by the reporter

Comments

@pureland
Copy link

there are many functions/events if develop a programs consist of several contracts ,difference function /event name is very important to update contract or other using.
so if use namespace smiler C++, but contract name as the default namespace of a contract, and replace "function name and Args" with "contract name" +"function name and Args" when calculate function Sig

@chriseth
Copy link
Contributor

Solidity did not take the approach of namespaces but rather of modules. This avoids the problem of having to come up with globally unique names, or at least moves this problem to the package manager.

If I understand you correctly, you suggest to add the name of a contract to the function signature to avoid naming conflicts. Note that functions in different contracts cannot really conflict, because each function call in Ethereum is always directed to a contract.

@chriseth chriseth added the waiting for more input Issues waiting for more input by the reporter label Mar 30, 2017
@axic
Copy link
Member

axic commented Oct 5, 2017

@pureland please reopen and expand if the answer isn't satisfactory

@axic axic closed this as completed Oct 5, 2017
@wighawag
Copy link

wighawag commented Oct 2, 2018

Note that there is now an ERC to discuss the potential benefit of namespacing function for use in the same contract : ethereum/EIPs#1407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for more input Issues waiting for more input by the reporter
Projects
None yet
Development

No branches or pull requests

4 participants