# [VOTE] Abstract final / Static classes

- Thread: https://externals.io/message/79601
- Original archive: https://news-web.php.net/php.internals/79601
- Started by guilhermeblanco@gmail.com on 2014-12-12T16:12:39+00:00
- Messages: 10
- RFC: Static class (Declined) — https://externals.io/rfc/static_class.md
- RFC: Abstract final classes / Static classes (Declined) — https://externals.io/rfc/abstract_final_class.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #79601 — guilhermeblanco@gmail.com — 2014-12-12T16:12:39+00:00

URL: https://externals.io/message/79601#79601

Hi internals,

After a good round of discussion, I updated the original "abstract final
class" proposal into a "static class" proposal.
However, I kept both patches online so it's up to voters decide which one
it could be implemented.
Patches are now complete and voting phase starts now and will be active
until 12/19/2014.

As this is a language update, it requires 2/3 pro or against the feature.

https://wiki.php.net/rfc/abstract_final_class

Happy voting!

Regards,

-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

---

## #79603 — Florian Margaine — 2014-12-12T16:18:56+00:00

URL: https://externals.io/message/79601#79603 · In reply to: #79601

Hi,



On Fri, Dec 12, 2014 at 5:12 PM, guilhermeblanco@gmail.com <
guilhermeblanco@gmail.com> wrote:
>
> Hi internals,
>
> After a good round of discussion, I updated the original "abstract final
> class" proposal into a "static class" proposal.
> However, I kept both patches online so it's up to voters decide which one
> it could be implemented.
> Patches are now complete and voting phase starts now and will be active
> until 12/19/2014.
>
> As this is a language update, it requires 2/3 pro or against the feature.
>
> https://wiki.php.net/rfc/abstract_final_class


Why does the example use `final`?

final static class Environment
{
    private static $rootDirectory = '/var/www/project';
    public static function getRootDirectory()
    {
        return self::$rootDirectory;
    }
}

Also, the vote presents 2 options. The RFC is in a weird state where it
mentions "abstract final" but doesn't explain anything about them. The
votes don't seem to be what the example is...

Could you edit your RFC?


>
>
> Happy voting!
>
> Regards,
>
> --
> Guilherme Blanco
> MSN: guilhermeblanco@hotmail.com
> GTalk: guilhermeblanco
> Toronto - ON/Canada
>

Cheers,
-- 
Florian Margaine

---

## #79604 — guilhermeblanco@gmail.com — 2014-12-12T16:28:25+00:00

URL: https://externals.io/message/79601#79604 · In reply to: #79603

It's part of the history of that RFC, accessible here:
https://wiki.php.net/rfc/abstract_final_class?rev=1417060830

On Fri, Dec 12, 2014 at 11:18 AM, Florian Margaine <florian@margaine.com>
wrote:
>
> Hi,
>
>
>
> On Fri, Dec 12, 2014 at 5:12 PM, guilhermeblanco@gmail.com <
> guilhermeblanco@gmail.com> wrote:
> > […]
>
>
> Why does the example use `final`?
>
> final static class Environment
> {
>     private static $rootDirectory = '/var/www/project';
>     public static function getRootDirectory()
>     {
>         return self::$rootDirectory;
>     }
> }
>
> Also, the vote presents 2 options. The RFC is in a weird state where it
> mentions "abstract final" but doesn't explain anything about them. The
> votes don't seem to be what the example is...
>
> Could you edit your RFC?
>
>
> > […]
>
> Cheers,
> --
> Florian Margaine
>


-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

---

## #79605 — Florian Margaine — 2014-12-12T16:30:31+00:00

URL: https://externals.io/message/79601#79605 · In reply to: #79604

Hi,

Le 12 déc. 2014 17:28, "guilhermeblanco@gmail.com" <
guilhermeblanco@gmail.com> a écrit :
>
> It's part of the history of that RFC, accessible here:
https://wiki.php.net/rfc/abstract_final_class?rev=1417060830
>

But then it isn't clear as of right now. What is proposed? The example? The
votes? What does `final` has to do with `static`?

I'm confused.

> On Fri, Dec 12, 2014 at 11:18 AM, Florian Margaine <florian@margaine.com>
wrote:
> > […]
guilhermeblanco@gmail.com> wrote:
> > […]
one
> > […]
feature.
> > […]
mentions "abstract final" but doesn't explain anything about them. The
votes don't seem to be what the example is...
> > […]
>
>
>
> --
> Guilherme Blanco
> MSN: guilhermeblanco@hotmail.com
> GTalk: guilhermeblanco
> Toronto - ON/Canada

Cheers,
Florian

---

## #79607 — guilhermeblanco@gmail.com — 2014-12-12T16:35:58+00:00

URL: https://externals.io/message/79601#79607 · In reply to: #79605

RFC is updated exposing both possible usages with both explanations.
Hope it doesn't confuse even more.

On Fri, Dec 12, 2014 at 11:30 AM, Florian Margaine <florian@margaine.com>
wrote:
>
> Hi,
>
> Le 12 déc. 2014 17:28, "guilhermeblanco@gmail.com" <
> guilhermeblanco@gmail.com> a écrit :
> > […]
> https://wiki.php.net/rfc/abstract_final_class?rev=1417060830
> > […]
>
> But then it isn't clear as of right now. What is proposed? The example?
> The votes? What does `final` has to do with `static`?
>
> I'm confused.
>
> > […]
> wrote:
> > […]
> guilhermeblanco@gmail.com> wrote:
> > […]
> final
> > […]
> one
> > […]
> feature.
> > […]
> mentions "abstract final" but doesn't explain anything about them. The
> votes don't seem to be what the example is...
> > […]
>
> Cheers,
> Florian
>


-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

---

## #79608 — Florian Margaine — 2014-12-12T16:37:41+00:00

URL: https://externals.io/message/79601#79608 · In reply to: #79607

Hi,

On Fri, Dec 12, 2014 at 5:35 PM, guilhermeblanco@gmail.com <
guilhermeblanco@gmail.com> wrote:
>
> RFC is updated exposing both possible usages with both explanations.
> Hope it doesn't confuse even more.
>
>
Perfect! Thanks.

Cheers,

-- 
Florian Margaine

---

## #79809 — Pascal Martin — 2014-12-18T20:54:44+00:00

URL: https://externals.io/message/79601#79809 · In reply to: #79601

> Patches are now complete and voting phase starts now and will be active
> until 12/19/2014.
>
> https://wiki.php.net/rfc/abstract_final_class

Hi,

After speaking about this RFC with other members of AFUP, we would be on 
the -1 side for this.

Summarizing our thoughts :
  *  static classes should not be encouraged
  *  if the goal is to have a set of utility functions, they can be set 
up in a namespace -- being able to autoload functions could prove 
useful, though.

-- 
Pascal MARTIN, AFUP - French UG
http://php-internals.afup.org/

---

## #79815 — guilhermeblanco@gmail.com — 2014-12-19T10:09:54+00:00

URL: https://externals.io/message/79601#79815 · In reply to: #79809

Hi Pascal,

I said this earlier, but considering purely namespaced functions and
autoloading is not the same as static classes. Namespaced functions doesn't
have support for variables and that's a huge strike against it and in favor
of static classes.

Cheers,

On Thu, Dec 18, 2014 at 6:54 PM, Pascal Martin, AFUP <
mailing@pascal-martin.fr> wrote:
>
> 
>
> > […]
>
> Hi,
>
> After speaking about this RFC with other members of AFUP, we would be on
> the -1 side for this.
>
> Summarizing our thoughts :
>  *  static classes should not be encouraged
>  *  if the goal is to have a set of utility functions, they can be set up
> in a namespace -- being able to autoload functions could prove useful,
> though.
>
> --
> Pascal MARTIN, AFUP - French UG
> http://php-internals.afup.org/
>
>
> --
> 
> 
>
>

-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada

---

## #79820 — Tjerk Meesters — 2014-12-20T00:43:52+00:00

URL: https://externals.io/message/79601#79820 · In reply to: #79607

> 
> 
> RFC is updated exposing both possible usages with both explanations.
> Hope it doesn't confuse even more.

Hi, in your "As static class” example, it doesn’t really demonstrate that you can omit the “static” modifier from the function declarations.

Also, it’s not clear if the same applies to “As abstract final”.

> 
> On Fri, Dec 12, 2014 at 11:30 AM, Florian Margaine <florian@margaine.com>
> wrote:
> > […]
> 
> 
> -- 
> Guilherme Blanco
> MSN: guilhermeblanco@hotmail.com
> GTalk: guilhermeblanco
> Toronto - ON/Canada

---

## #79872 — guilhermeblanco@gmail.com — 2014-12-23T00:08:22+00:00

URL: https://externals.io/message/79601#79872 · In reply to: #79820

Hi everyone,

Voting is now closed.
Since this RFC required a 2/3 majority, the result is against the
implementation of this feature in PHP.
RFC is now updated and moved to withdrawn section.

Thanks,

On Fri, Dec 19, 2014 at 10:43 PM, Tjerk Meesters <tjerk.meesters@gmail.com>
wrote:

>
> > […]
>
> Hi, in your "As static class” example, it doesn’t really demonstrate that
> you can omit the “static” modifier from the function declarations.
>
> Also, it’s not clear if the same applies to “As abstract final”.
>
> > […]
> florian@margaine.com>
> > […]
> active
> > […]
> it
> > […]
>
>


-- 
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada
