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

A clearer naming convention for events #3435

Closed
devzl opened this issue Jan 24, 2018 · 1 comment
Closed

A clearer naming convention for events #3435

devzl opened this issue Jan 24, 2018 · 1 comment

Comments

@devzl
Copy link

devzl commented Jan 24, 2018

The only convention that differentiates triggering an event from calling a function now, is the capital letter at the beginning of an event.

I think it will be a better thing, to make the code of a Solidity snippet more clear, and make a developer's intentions explicit, is to prefer another naming convention for events such as:

  • Putting an "E_" at the beginning. Example: E_Transfer
  • Ending the name with "Event". Example: TransferEvent
  • Ending the name with "Log". Example: TransferLog

What do you think of this proposition?

@federicobond
Copy link
Contributor

For code style conventions, the well-known ConsenSys Smart Contract Best Practices recommend adding a Log prefix. For language-level differentiation, please follow the discussion here: #2877

@devzl devzl closed this as completed Jan 26, 2018
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