Re: A modest proposal: __contructStatic

From: Date: Mon, 16 Feb 2015 10:32:11 +0000
Subject: Re: A modest proposal: __contructStatic
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-82809@lists.php.net to get a copy of this message
Kris Craig wrote on 16/02/2015 01:40:
create the static instance Isn't that essentially a contradiction in terms? I can't help but feel that blurring the line between static and non-static classes/methods would cause more harm than good. I've never really done any work with Redis before so I'm also having trouble understanding the use case for this given that everybody's talking about this solely in the context of Redis.
It's basically like any database connection - in a simple app, you just need a single connection that you can run lots of queries against, so global/singleton access is very convenient. I do see the use case, but am not sure it's compelling enough to add a language feature, given that a similar effect can be achieved using existing features. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#82809) next »