Re: [RFC] Pipe Operator

From: Date: Mon, 09 May 2016 05:37:46 +0000
Subject: Re: [RFC] Pipe Operator
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-93120@lists.php.net to get a copy of this message
Hi! > "|>" is just a building block for simpler coding. It could be used badly, but > it helps a lot. Procedural code could be much simpler and readable with "|>". I don't see how it helps anything. It just replaces clear variable names with cryptic sequences of characters with no intuitive meaning and magic semantics invented solely to save a few keystrokes. Moreover, it would only in one sole use case where functions always return a value that is immediately passed to the next one and is sole argument for it, and never produce errors or require any logic beyond calling them in a sequence on one value. > "|>" version is much easier to read and write. Quite the opposite. It has completely unobvious syntax (what is $$? What is the value of $$? how I see this value if I need to debug this code?) and does not allow to do anything but making code more cryptic. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#93120) next »