PasswordPusher icon indicating copy to clipboard operation
PasswordPusher copied to clipboard

Constructor Naming

Open AnandK-2024 opened this issue 3 years ago • 1 comments

In this section ,there are nothing informative .

what was the purpose of build this section?

AnandK-2024 avatar Oct 11 '22 20:10 AnandK-2024

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?

AnandK-2024 avatar Oct 11 '22 20:10 AnandK-2024