Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104316 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6573 invoked from network); 8 Feb 2019 18:27:45 -0000 Received: from unknown (HELO mail-ot1-f47.google.com) (209.85.210.47) by pb1.pair.com with SMTP; 8 Feb 2019 18:27:45 -0000 Received: by mail-ot1-f47.google.com with SMTP id k98so6338624otk.3 for ; Fri, 08 Feb 2019 07:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xctW18BAfCH3sqpWF7DjkObviEldfcRnWMma4Eu/h2s=; b=nhQfwxzNADswHOhf6jKhswqsUvXL6GPYQULRuTmOlcnJNrJaeEYgS47CmqZCfDSjFD 55KDvm+XYao9ljE1eSIfmxr0NlZnkkxGrO2Ab3G1VHz3rqxuM60md6A6u+EyhrFzGMOh 1zQVKURAike89BUeT5tFHuhgAB3WYC9VlteLIN86ZaJ6kg0XFMH/lh9rzKadIRwLupS4 LuBKS7hDwjS+OTg7qRA7U7jAzwN8Fzw7JmYOpHzVeUX5r50ibG/jWCRJI4NbG+hF4G0O WZhktXfadajnl/PxJwlchxJ4Xl0cFM03AyNrsxXVJB8jbSpRT+87vIqNh9VcVUlc5jPE 5voA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xctW18BAfCH3sqpWF7DjkObviEldfcRnWMma4Eu/h2s=; b=jkS8frp6+cFNfdpgZrb7FDytavpJzDoS65Yhe5vsyrzWnEqViDxrR+vVatDayJY2O2 OV3fR8Dk6meWLZEv2N3aCZbyP+XgH1SGFQbUqYcho+luV/YXz/3sWk34lL6muV14j7v6 Nhp4DcB+EwwgZnNF+oGmB5LgUp/ysMaxfpG5RoFAJRfBrrUmGkPNg9a9ciEXGIHkq/TJ ki4VS700NB3AftOlxoePLnE+s1PVYbwJ7miomAS1ZH+8FGNWPnzZFkztcxMPCMySvGy0 mm/wEFK4f30LLsb4iqFY5fGKttEnTFJmO5+rB9ovjZ8cEfr2BaAoLNpmFFQnNBQvcrWL G96g== X-Gm-Message-State: AHQUAuaIn3n40DQmY+ryFt+FZO4L7qoD9/hFgIIiCeoLcByVtO+1TFRa 1b9cbZSso1Ql3SukmUtTSREwOlGS+ryU3dZzQYs= X-Google-Smtp-Source: AHgI3IbQdFNxgeYVJlSmu/n3ZxwBGXExkFV2+LdcGZ1SCLSamKqlqCYSMofEPvKTMinwAuBIdDucv1s44K4dQwU23Cw= X-Received: by 2002:a9d:7f8b:: with SMTP id t11mr5672139otp.351.1549638579548; Fri, 08 Feb 2019 07:09:39 -0800 (PST) MIME-Version: 1.0 References: <695e24fe-386f-c11a-4bd3-81129cb9ffe2@korulczyk.pl> <42a5e3cb-358a-3e8e-0985-099263a57374@korulczyk.pl> <9974bd0d-fcfe-6a85-fd28-7a61780f055b@korulczyk.pl> <1ef96d96-d0dd-5efc-ec07-aaaf5195379b@korulczyk.pl> In-Reply-To: <1ef96d96-d0dd-5efc-ec07-aaaf5195379b@korulczyk.pl> Date: Fri, 8 Feb 2019 13:09:30 -0200 Message-ID: To: Robert Korulczyk Cc: Marco Pivetta , Rasmus Schultz , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000010778c0581635950" Subject: Re: [PHP-DEV] Mixed type-hint From: marcospassos.com@gmail.com (Marcos Passos) --00000000000010778c0581635950 Content-Type: text/plain; charset="UTF-8" It is just a (draft) proposal. Anyway, the RFC does not force you to declare a mixed type but brings an option for who wants to. On Fri, Feb 8, 2019 at 13:03 Robert Korulczyk wrote: > There is no reason to introduce `mixed` type-hint if it does not provide > any validation and works the same as no type-hint at all. > > Regards, > Robert Korulczyk > > W dniu 08.02.2019 o 15:54, Marcos Passos pisze: > > Those cases should be handled with runtime validation, there is no > reason for changing the concept of mixed. > > > > On Fri, Feb 8, 2019 at 12:39 Robert Korulczyk > wrote: > > > > > Could you clarify on a use-case for changing the semantics of > `mixed`? > > > > For example storage which does not allow to store null. Like simple > cache which treats null as "miss", so it is not able to cache null as value. > > > > Obviously it is not a deal breaker and use case is quite rare > anyway, but this is just example when mixed type-hint may work as actual > type-hint, not > > just replacement for PHPDoc or equivalent of... nothing. > > > > > > > > Regards, > > Robert Korulczyk > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --00000000000010778c0581635950--