Not sure what you mean, but ternaries are right-associative in Perl just like most other languages. PHP is the odd one out.
21 karma · joined August 10, 2022
This seems like it’s mostly syntactic sugar for assertions, keeping them at the interfaces of the function (in and out).
It can also be sometimes useful to have these conditions right there alongside the implementation and not just somewhere else in your unit tests.
Is life truly that tenacious or are we incredibly lucky? Perhaps best not to tempt fate if the latter.
English is the JavaScript of human languages.
The Perl community themselves eventually extended the motto to "There's more than one way to do it, but sometimes consistency is not a bad thing either"