Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc

From: Date: Wed, 20 Feb 2013 08:02:36 +0000
Subject: Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-66022@lists.php.net to get a copy of this message
While I'm thinking about this (though I should leave it alone): who's to say that PHP won't some day get inner classes? By deciding the "default" inner member of a class will be a function, you're choosing the one that has a global/procedural equivalent where the short syntax won't work, instead of leaving the concept unused for the possible future when: class myClass { mySomething { // is equivalent to class mySomething { (Yes, you could say mySomething(...) { } is a public function and mySomething { } is an innner class, but you get the idea.) -- S.

« previous php.internals (#66022) next »