Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14729 invoked from network); 19 Dec 2017 08:49:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2017 08:49:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.47 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.47 mail-it0-f47.google.com Received: from [209.85.214.47] ([209.85.214.47:41801] helo=mail-it0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/60-10479-8A2D83A5 for ; Tue, 19 Dec 2017 03:49:44 -0500 Received: by mail-it0-f47.google.com with SMTP id x28so1909132ita.0 for ; Tue, 19 Dec 2017 00:49:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TgaOP3c6wY/iAh2qe9JBfjxedhk9u1fHqp0lBGFgOzM=; b=Chbabr3q2gTPQUIrt9Q9N0oG8s8pEHs0IDohpdS7SrglWkHPdKOz0MIQdE6go23Aad JAgqt6dGQYDD21+RkJKSEIUzTkZfaG0DgbKgG6jQGTSRiW5nI3SNrmmzVC75KmYvG79G qzUPy3rO9sJGXJGE6cdrJtWU4KQF7XI8/vXmu+oisSmIowW16A2Ygvb3fKytT5Jr3G3M cnbYH67mzU50knpalIac83T5G3qiYtQXbzL1/zwwdD1rUmhQFP978e6Wev70ko9YsTgW S/o0GE6Cd4NqlRiLsFT6ZjiEn0aiKgTOmNrA3erWaLaJrKCoE5cOBhf0vH8meLZEkTx6 f+yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TgaOP3c6wY/iAh2qe9JBfjxedhk9u1fHqp0lBGFgOzM=; b=R6f+igUGOTeHwymAJPcYpD0qsc0aZcoP8jOR/IaOYq86B5LVE1lkQbm4eanrsbseUi 1ZZEqorH9bsd0JVukK/hKUlzUBLoT/Vsyjxqhray7EnaIPC9XDq7AtCq1dAEUYe9qGj+ XEhb8/xmtRovu9sCZp6jqHzPg+50Iv8grg+aC0UlXnVd2PFW8IjmxMDFZoie7r8Z+/ht WN0wvjNOHW9adkhbiLCm+7eHp4zlHPx/DycOuWptzGUOS8XfLRhP06DnrPzk8kfZJouW xLX3Bz2+MORxW3quwjHWlGvTf61UKosvIASb01zqGf8+kjZbaBnLsPoKXE4Xd0MyBzoT K8PQ== X-Gm-Message-State: AKGB3mLNwumIws90KruihhdUHLsz9RissGjWl19ku6vWODTYceuPb//a /jhAIIquoIE3JS6lmPuSpFaMOHs= X-Google-Smtp-Source: ACJfBosgUCWO7iFpqBgC6hQow8NvuVMIcw+pjyxGk3+I9sBsqUxFzFQr4mHenN8sggeRwK3Os6HOWw== X-Received: by 10.36.200.139 with SMTP id w133mr2496815itf.31.1513673380606; Tue, 19 Dec 2017 00:49:40 -0800 (PST) Received: from Stas-Pro-2016.local (c-73-71-144-171.hsd1.ca.comcast.net. [73.71.144.171]) by smtp.gmail.com with ESMTPSA id a69sm5296789ioa.48.2017.12.19.00.49.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2017 00:49:40 -0800 (PST) To: Niklas Keller Cc: Michael Moravec , PHP Internals References: Message-ID: <0ee72877-0978-95a2-d09c-85dcaf18a0b9@gmail.com> Date: Tue, 19 Dec 2017 00:49:38 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Mixed Typehint From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Why document code? It contributes nothing to the behavior of the code, > well, unless you parse it as annotations. I am not sure I understand - are you arguing for supporting "mixed" in *documentation*? Then it's already supported and there's no need for any RFC. But if you're arguing for supporting it in the code, it's useless and has nothing to do with documentation - which you'd have to write anyway. > The current one isn't any convention, it's just not possible to do > something else. There's nothing that explicitly allows saying "I accept > all types", rather than "The type I accept is unspecifed". There could be of course logical constructions that are not supported by the type system. "mixed" however has the accepted meaning - and that meaning is exactly the same as not specifying the type. I do not see any additional use of type that only means "unspecified type" - it looks like its sole reason is so that somebody could say "I now have lots of types in my code!" which does not seem to me a worthy goal. Types should serve a purpose, this one serves none. -- Stas Malyshev smalyshev@gmail.com