Recently introduced pipeline operator is great, but together with assignment operator it will lead to mixing top-to-bottom and bottom-to-top code reading directions and vertigo.

To reduce this problem i'd like to discuss the idea of left to right assignment operator. The draft rfc can be found here https://github.com/vadimonus/php-rfc-pipeline-assignment/blob/main/rfc.md , there is the part, that describes problem.

It currently has one question (can we use |> also for assignment?), that would be better to discuss before 8.5 release, to avoid later breaking changes.

If someone like the idea, i need wiki rfc creation rights to create rfc. I do not think it would be to hard to implement it, as it is just another syntax for existing operator, and should lead to exactly same bytecode. I could try to implement for 8.6 release (not sure it is possible to implement it in 8.5 as it is already in alpha, but if it is possible, maybe someone will decide to quickly implement it for 8.5).

Reply via email to