Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16957 invoked from network); 3 May 2016 18:36:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2016 18:36:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.86 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.86 mx105.easyname.com Received: from [77.244.243.86] ([77.244.243.86:45000] helo=mx207.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/06-03860-BBFE8275 for ; Tue, 03 May 2016 14:36:44 -0400 Received: from cable-81-173-133-226.netcologne.de ([81.173.133.226] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1axfBY-00057p-VF; Tue, 03 May 2016 18:36:41 +0000 Reply-To: internals@lists.php.net References: <4fc01507-3d07-2309-a4e4-4cad7325249b@gmail.com> To: Sara Golemon , PHP internals Cc: Terry Cullen , Stephen Coakley Message-ID: <39071a01-a42c-0952-b3a8-b4769c79b56b@fleshgrinder.com> Date: Tue, 3 May 2016 20:36:30 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JKTW5SpBhvdj6oQWstOosRtT60QqB93aO" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC] Pipe Operator From: php@fleshgrinder.com (Fleshgrinder) --JKTW5SpBhvdj6oQWstOosRtT60QqB93aO Content-Type: multipart/mixed; boundary="F9NVlinNRnlIT7eqVTSb3JxNkX6RqXL7k" From: Fleshgrinder Reply-To: internals@lists.php.net To: Sara Golemon , PHP internals Cc: Terry Cullen , Stephen Coakley Message-ID: <39071a01-a42c-0952-b3a8-b4769c79b56b@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC] Pipe Operator References: <4fc01507-3d07-2309-a4e4-4cad7325249b@gmail.com> In-Reply-To: --F9NVlinNRnlIT7eqVTSb3JxNkX6RqXL7k Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/3/2016 8:12 PM, Sara Golemon wrote: > The difference with scalar objects is: > A) We need to agree on what methods these objects are going to have. > ((And we won't agree)) >=20 The nice thing here is that we could start with the things that we agree on and develop it from there further. On 5/3/2016 8:12 PM, Sara Golemon wrote: > We could maybe hedge our bets with a ->invoke(Callable) method that > pushes the value into an arbitrary closure, but that's just adding > complexity to... avoid adding complexity... o.O >=20 That would be pure evil. On 5/3/2016 8:12 PM, Sara Golemon wrote: > B) It's not just about scalars. >=20 > $foo =3D SomeLibrary::create(...) > |> SomeOtherLibrary::render($$) > |> $foo->send($$); >=20 > Scalar objects don't help this case at all, and since the object > instances are coming from some third-party library, making them > instantiate extended children instead isn't necessarily a trivial > thing (arguments about poorly designed libraries aside). >=20 > I like the scalar objects approach as well. Heck, I wrote one three > years ago: https://github.com/sgolemon/objectifier but I don't think > it solves the same problem space as pipe chaining. >=20 The pipe operator is also just a work around for poorly designed libraries in this case and yields more poorly designed libraries. --=20 Richard "Fleshgrinder" Fussenegger --F9NVlinNRnlIT7eqVTSb3JxNkX6RqXL7k-- --JKTW5SpBhvdj6oQWstOosRtT60QqB93aO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXKO+zAAoJEOKkKcqFPVVraQgQAMlLb7zNA9nFreW5bmx85aG1 /nXsuIB4gla3fC68495o/6Exxz5+nhvJGHXqHynZMh5gtDYqvwUtI0XT+Y8+ETNh VfqZgBBm13ruK+n8PRrUoEap1bhEeFQYItd3SqUEXNKiyY1YXTFPak1k2TD3Eaww AAc8lMJkjYa4KE8n6kfTHgYRNzQpBs9/DxAy3Gxgc3J2YUSjzpCqS2CK8+kFgt6n qJX5phQwFayfyhKop1ppywBfuyBlrKbcsoD2VwpGvBPa1jffMLVetEubO8rtCmNg YzM39RUPF/O93WSGADmS0Otg8RU705u/6qgXUB2rZ7EcyTruTG9dHnDqWBh6WoOt bKqItmI3lZLc5epud1JIrviTUNwLxdH8s1eiyenftmcQfVUj6uo5Fq6UZxx1CZkC a+F0wU0jM7GP4T7NarFwGLSYg4202zS2InctutLQ/GP5pOdGskIDKhknQGn9IE/N z4VQgKzdGJpvIFkqWFnTrR/v4SjisS0M5Vs0Tr0LZU6WyiDVmO++ifSBKhp8ECXC st32A9jFwl/KN/u1m+oOhDLFtDt0XZwSsoMt51YYiPQii+CBYb8mKF1bt2AqttV0 IF9BCo+L1RqtMdvyabQMc/o+MV7nODxL4Hv0cd8ZV3KgcQq9TY7wVKZO1VcYHOq6 xYeCGiaQc0Rp6umJ4rj7 =UQco -----END PGP SIGNATURE----- --JKTW5SpBhvdj6oQWstOosRtT60QqB93aO--