Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48107 invoked from network); 30 Jun 2018 20:28:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2018 20:28:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=pmjones88@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pmjones88@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.67 as permitted sender) X-PHP-List-Original-Sender: pmjones88@gmail.com X-Host-Fingerprint: 209.85.218.67 mail-oi0-f67.google.com Received: from [209.85.218.67] ([209.85.218.67:37301] helo=mail-oi0-f67.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/43-15351-408E73B5 for ; Sat, 30 Jun 2018 16:28:54 -0400 Received: by mail-oi0-f67.google.com with SMTP id k81-v6so11452450oib.4 for ; Sat, 30 Jun 2018 13:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=G7uGN1OGXJfrx1FBG9fo3OZFgf3SYeOWjTKUyzO+LqQ=; b=MdKN3GqOzSBPeDruYa/hBO0/QzxD9XAClgiCsrMysxdNTm4QGR6O37hroaRo2kZgpe bjrVLDVzcEJHD/lKPsI9XJ27jXxOU3cnGL0o6mlNYDPsKxgXMl+vfPQIfHrsEbeWC0VJ x1jvvxsbcKj+kcSm/jdJ+/hnWSOoWePyWV8HL+N3k3wYadvSumbYWrIuetljZ0sXEF8s XBz+5IfXppeKJTQIf+682gSxqS+Bgn0XSaJuZC7/DhhT5eqyrAY/UKg55HOl/zleMpFE ySgYhH0qVa08B6K7WI2+0PaPJbMlv6kBYC2lhAbUacilA1/ofnwUUeWzckRTYEuh2K2j 2t6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=G7uGN1OGXJfrx1FBG9fo3OZFgf3SYeOWjTKUyzO+LqQ=; b=DogmWHdicxmBkzKUlrcPhjgJRuDxEiE7yWJT3maSdveQh4MlUbyVGZXx+8bPdrovhj HGLeT1AKr24DSlhXRRiT9a/05xu72qwEdmvNd8+9rFkJB3txYANYtTzX+xQzN9mhjawv iFFkP1h3ji4scYQbu8OBOPdmSRnxzhfrfrDMKq7sOe434iVtWW90TDvy8RMqnxs6RWR7 X8JtWLNIltL9oMLhJAfnFRcyNocD5u3t8XzSmIfS7pC6occeFjCKJtdY7sGP2H9Xi0nW aZ+MB1Yc5Xrx1nfE+H0f1jBORNi8vCjwPNGd2H9eVCKnv97ufwC5718RoGYHjoAI3KWe bBjQ== X-Gm-Message-State: APt69E1yDUHFge3EdYXidLr4NcwNuNy2VIubyZpirEnL9qgr+8sgcT8b bd3Cre3/mpZwuIFwm36wj5w= X-Google-Smtp-Source: AAOMgpdDrkMeGFT+YM7kdzeRFD/wHsWGC5FuY41AM0Gzx8bOrPik253zxe2AY4MyzLPz6pLtMBbffA== X-Received: by 2002:aca:4c0e:: with SMTP id z14-v6mr8774430oia.230.1530390529706; Sat, 30 Jun 2018 13:28:49 -0700 (PDT) Received: from [10.90.195.143] (107-223-28-39.lightspeed.nsvltn.sbcglobal.net. [107.223.28.39]) by smtp.gmail.com with ESMTPSA id r131-v6sm5935237oih.16.2018.06.30.13.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jun 2018 13:28:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) In-Reply-To: Date: Sat, 30 Jun 2018 15:28:47 -0500 Cc: Stanislav Malyshev , Gabriel Caruso , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <854a8dfc-4bc1-c001-a1a7-5347e5483ac8@gmail.com> To: Sara Golemon X-Mailer: Apple Mail (2.3445.8.2) Subject: Re: [PHP-DEV] [RFC] Mixed type From: pmjones88@gmail.com (Paul Jones) > On Jun 30, 2018, at 15:17, Sara Golemon wrote: >=20 > I'm not super excited about this RFC because, as you say, this = information could be easily encoded into the docblock for the = function/method. I would enjoy a 'mixed' typehint for exactly that reason; i.e., that I = don't have to put it in a docblock. Given this method ... public foo(string $bar, int $baz) : void { ... } ... I don't need any docblock at all for the params. But given *this* method ... public foo(string $bar, int $baz, $dib) : void { ... } ... I find myself wanting (for completeness' sake) to add a docblock = indicating the $dib typehint: /** * @param mixed $dib ... */ public foo(string $bar, int $baz, $dib) { ... } ... and *then* the docblock looks unusual to me, and I want to fill out = all the rest of the params in the docblock. Yes, I'm aware that may be idiosyncratic. Even so, being able to do this = ... public foo(string $bar, int $baz, mixed $dib) { ... } ... relieves that bit of docblock dissonance. If it does so for me, I = bet it would do so for others. --=20 Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php --=20 Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php