Solidity: A clearer naming convention for events

Created on 24 Jan 2018  路  1Comment  路  Source: ethereum/solidity

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?

Most helpful comment

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: https://github.com/ethereum/solidity/issues/2877

>All comments

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: https://github.com/ethereum/solidity/issues/2877

Was this page helpful?
0 / 5 - 0 ratings

Related issues

area picture area  路  3Comments

leviadam picture leviadam  路  4Comments

madvas picture madvas  路  3Comments

axic picture axic  路  4Comments

chriseth picture chriseth  路  4Comments