This is a constructor in the old syntax. The name, MyToken matches the name of the contract and this is therefore considered the constructor. Like this:
contract MyToken {
function MyToken( ...
This is the old system. This caused some errors on the part of developers, so more recent compilers use the constructor keyword, like this:
contract MyToken {
constructor(...
Construtors are like init() in other languages. They run exactly one time during deployment. They cannot run again and because of this, the constructor bytecode isn't even stored.
The pattern you see also uses inheritance and arguments passed into constructors. Suppose you have a contract DetailedERC20 and it's constructor takes some arguments (_name, _symbol, TOKEN_DECIMALS)
You also have MyToken and it inherits from the first, like:
contract MyToken is DetailedERC20 { ...
MyToken has a constructor that is taking some arguments. Some of those arguments need to passed through to DetailedERC20's constructor so it will know what to do.
The first set of arguments (Registry _registry, string _name, string _symbol) is declaring the function signature. Notice all the variables are typed. The second one is scooping up some of the defined inputs and passing them into the inherited constructor.
There is another example/explanation over here: Inherited Constructors
Hope it helps.
Inherited Constructoris the keyword. Thank you very much, that makes sense to me! Would an inherited constructor look in the new syntax the same? – sunwarr10r Nov 14 '18 at 18:42constructor. – Rob Hitchens Nov 14 '18 at 18:49constructor(_var1, _var2) public NameOfInheritedContr (_var1, _var2) { ... }– sunwarr10r Nov 14 '18 at 18:53function constructor(). The inheritance arguments syntax uses the name of thecontract. – Rob Hitchens Nov 14 '18 at 18:56DetailedERC20(_name, _symbol, TOKEN_DECIMALS)inside{ ... }of the constructor. Wouldn't it be the same? (see my edited question) – sunwarr10r Nov 19 '18 at 06:56