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

Constructor Naming #302

Open
AnandK-2024 opened this issue Oct 11, 2022 · 1 comment
Open

Constructor Naming #302

AnandK-2024 opened this issue Oct 11, 2022 · 1 comment

Comments

@AnandK-2024
Copy link

In this section ,there are nothing informative .

what was the purpose of build this section?

@AnandK-2024
Copy link
Author

Up to Solidity 0.4.21

constructor can be defined by the same name of its contract name.
However, this can possibly cause unintended bugs when contracts are renamed and their constructors are not renamed.

Solidity 0.4.22 and above

Use a constructor keyword and create an anonymous function.

bad habbit : function constructor(args) {....body........}
but
good habit: constructor (args) {.body..} .


@ team, is this content sufficient to make PR for this issue?

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