eugen's avatar

Eugen Neuber

eugen

Member since

604

Total Reputation

5

Total Arguments

8

Total Votes for Arguments

Arguments and votes

1

Parentheses do not add anything to a human to understand what is going on.

Since PHP does not require curly braces in strings most of the time, we can get rid of those parentheses too (when they are not required by the language anymore).

Share:
Read the RFC: new MyClass()->method() without parentheses eugen avatar
eugen
voted yes
1
  • less clutter
  • syntax worked for other languages
  • easy understandable
Share:
Read the RFC: The Pipe Operator eugen avatar
eugen
voted yes
1

Makes it more readable.

Share:
Read the RFC: Property Hooks eugen avatar
eugen
voted yes
83

With First-class callable syntax available since 8.1, it would now be possible to write it as below, which is much better then string names of functions:

$result = "Hello World"
    |> htmlentities(...)
    |> str_split(...)
    |> fn($x) => array_map(strtoupper(...), $x)
    |> fn($x) => array_filter($x, fn($v) => $v != 'O');
Share:
Read the RFC: The Pipe Operator pronskiy avatar
pronskiy
voted yes
10

Technically writing a trait isn't a showstopper, but it adds cognitive load because the developer now must know/remember using this Interface requires adding this Trait. PHP should focus more on development experience!

Share:
Read the RFC: Interface Default Methods eugen avatar
eugen
voted yes
39

PHP is evolving. There are new concepts added to many programming languages to ease writing and reading (more important!). PHP should focus more on developer experience (but not for legacy projects that get never upgraded to PHP 8+).

Share:
Read the RFC: Short Closures 2.0 eugen avatar
eugen
voted yes
81

We spend a lot more time reading code than writing it. The elegance of short closure combined with the convenience of variable scope usage has already shown to be a game changer on Typescript and there doesn’t seem to be any technical issue with having it on PHP.

Share:
Read the RFC: Short Closures 2.0 marco avatar
marco
voted yes
39

Creating traits for default implementation is just a pain. I want syntactic sugar

Share:
Read the RFC: Interface Default Methods marc avatar
marc
voted yes
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!