On 12/10/2017 22:32, Sara Golemon wrote:
answer, but (Foo::class.'::bar') may be what some would expect.
Ideally we'd have first-class references to functions.
-Sara
To chime in..
To my mind, references to functions is the holy grail so far as
beginning to clean up the entire ecosystem arou
On 12/10/2017 22:32, Sara Golemon wrote:
> Ideally we'd have first-class references to functions.
> -Sara
To chime in..
To my mind, references to functions is the holy grail so far as
beginning to clean up the entire ecosystem around function calls.
IMHO directly referencing MyClass::StaticFu
>
> I also thought about the same for functions, just to be even more
> consistent.
> my_func::function
I already had the exact same ideas, but didn't propose them yet.
$obj::foo::method could be used for instance methods, while
Obj::foo::method could be for static methods.
Regards, Niklas
I also thought about the same for functions, just to be even more
consistent.
my_func::function
On 12 Oct 2017 23:32, "Sara Golemon" wrote:
> On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler
> wrote:
> > I am open for any approach, but maybe we have to differentiate between
> class constants and
On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler wrote:
> I am open for any approach, but maybe we have to differentiate between class
> constants and method references?
>
Given the discussion we had around the namespace separator (and why we
DIDN'T go with ::), there may be similar issues here.
Hi,
I am open for any approach, but maybe we have to differentiate between class
constants and method references?
Michael
> Am 12.10.2017 um 20:28 schrieb Mathias Grimm :
>
> The only problem with the @ symbol is the lack of consistency with the other
> constants class constants are also My
Hi,
Same i have in mind, for example: MyClass@myMethod
To make also some method call routing easier, e.g. in userland routers.
Transform the current approach:
$app->get("/foo", [MyClass::class, "myMethod"]);
To:
$app->get("/foo", MyClass@myMethod);
This will ease a lot, e.g. for refactoring,
The only problem with the @ symbol is the lack of consistency with the
other constants class constants are also MyClass::MY_CONST, or
MyClass::class, so I think it makes sense to also be
MyClass::myMethod::method
On 12 October 2017 at 20:24, Michael Döhler wrote:
> Hi,
>
> Same i have in mind, f