Skip to content

Latest commit

 

History

History
106 lines (54 loc) · 4.98 KB

rfc_codex.md

File metadata and controls

106 lines (54 loc) · 4.98 KB

RfcCodex

There are some notes on PHP RFCs, why some were declined, and what others might need for them to be implemented.

The purpose of these documents is to avoid information from being lost and to try to avoid conversations needing to be repeated multiple times on PHP internals.

Things still being discussed

Array key casting

Auto-capture closure aka multi-line blocks

Better web sapi

Call site error or exception control

Chained comparison operators

Class method callable

Class scoping improvements

Closure self-reference

Generics

Method overloading

Non-extending code re-use

Out parameters

Pipe operator

Standardise core library

Strict mode and internal engine callbacks

Strings/encoding is terrible

Strong typing

Structs

Template string literals

Throws declarations

Tuple return declarations. Hmm I wrote this one up twice as multiple return type

Type aliasing

Type callable signatures

TODO

These need to be summarised.

packages.md partial_function_application.md

Ideas that overcame their challenges

PHP is actually getting better. These are all things that used to be pipe-dreams, but are now in PHP core.

Annotations

Briefer closure syntax

Co- and contra-variance

Enums implemented by Enumerations.

Immutables - this is done through the Readonly properties. There is still some work to do here, as currently it is slightly annoying to clone an object and during the clone change some of it's properties.

Named params

Null short-circuiting - https://wiki.php.net/rfc/nullsafe_operator

Null type

Referencing functions - implemented by First-class callable syntax

Ternary right associative

Union types

Things that are probably moot

PHP is actually getting better, but that means that some solutions to problems have become pretty moot, as they seek to solve problems that are now less of a problem.

Consistent callables

Explicit defaults

Misc notes

SPL notes

Contributing

Please read the contributing guidelines before writing your 4,000 word novella on why some RFC really should pass.

Disclaimer

I reserve the right to be as opinionated as I feel like when commenting on RFCs; I'm not going to attempt to stay 100% neutral when talking about RFCs that I consider to be either dumb or bad for PHP.