Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92779 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65545 invoked from network); 26 Apr 2016 14:13:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 14:13:12 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.161.173 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.161.173 mail-yw0-f173.google.com Received: from [209.85.161.173] ([209.85.161.173:33666] helo=mail-yw0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/6F-02401-6777F175 for ; Tue, 26 Apr 2016 10:13:11 -0400 Received: by mail-yw0-f173.google.com with SMTP id t10so16076438ywa.0 for ; Tue, 26 Apr 2016 07:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=JA9OIUkq0880/iM7TLcvM882VVXs8jVjEUbi350NgV4=; b=XFw6VH/OwdUaRMXXmXtM3suWhlLIdav/aJdLPte3+2ojog0Nju6asZcFFIVypbHQN+ rrEvDQQtgGcBdNP1kyU3tDEguvtLQrvXjDevfhSNoGZ1+TGjzJUta5sPMaOaoiX1aJfR sKpMa2jH2PJ4VDJvy82WFMRB2AVoNICC2AhV22Y+2OnPAgcu2knCnF1hEeCP2yO1V5iF orxYPrwAOSAqy39IwEywOEwllIPnSvT4aoBse/56cotxapYBCLCpJ/mImoRUFzZIkuDx 1f4vbrfjgeoQUoXu8pnrPAcFlj4T63wiyElILSQQYCvQhCt+zkINjawp3kSf0EWrzpJR 1XiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=JA9OIUkq0880/iM7TLcvM882VVXs8jVjEUbi350NgV4=; b=eIu12lrsMmy9wIha5FwpmGm9nxWL/JczW+i380UdousmkPxUfwlAxkq1jbn2VKrinh tqfj5ow5+ZMj9qBGEfqXR+KxzEYTYehqUdeCgVzyhR7YMGOAcl97cevK6kctbPfX+KYH oqPzUHw8Un2orC8ipU3ZfxB8jMIkD8eAKctv95DWveL2cBRutWfm6WHdfb2TKxX4p19C 2BCswc/MpFmzNImFeTxJaZiLIciGQRCjcqTHC3oguuC0XoMdhcwUBaGSQTdZA7I3n346 h++P4RFKKdK6oY4Ulm/SVc8chUN7YAxtKTXWyqatxdDaY9CttWlNT0FGZNNxyNZjfuGp iE8Q== X-Gm-Message-State: AOPr4FVRwHDqObDNc+A8Aj7pcruuWw1n2b+aE7BNO91SE5qxPfhsw0yqlFijd/XyM2q0zVHtLc3fw5dcLMevUw== MIME-Version: 1.0 X-Received: by 10.13.225.149 with SMTP id k143mr1385640ywe.256.1461679987622; Tue, 26 Apr 2016 07:13:07 -0700 (PDT) Received: by 10.129.109.67 with HTTP; Tue, 26 Apr 2016 07:13:07 -0700 (PDT) X-Originating-IP: [165.120.174.34] In-Reply-To: References: Date: Tue, 26 Apr 2016 15:13:07 +0100 Message-ID: To: Dmitry Stogov Cc: Levi Morrison , internals , Bob Weinand Content-Type: multipart/alternative; boundary=94eb2c0775bc703794053163e4b4 Subject: Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types From: pthreads@pthreads.org (Joe Watkins) --94eb2c0775bc703794053163e4b4 Content-Type: text/plain; charset=UTF-8 Afternoon Dmitry, I started the implementation of this because unions and nullables appears to be in my way (typed properties). At no point did Levi request an implementation. I decided, selfishly, to provide one because it's in my way, and we've been waiting so long already. There is no conspiracy. I would actually like it if nullable types came first, I would have preferred not to have my work on typed properties stopped also. We don't always get what we want :) Cheers Joe On Tue, Apr 26, 2016 at 2:33 PM, Dmitry Stogov wrote: > hi Levi, > > It looks like your "work" on "Nullable Types" RFC was intended to win time > for this patch and block "Nullable Types" again. > Actually, you have been blocking it for more than a year :( > > I'm going to push my own RFC for voting together with "Union Types". > > https://wiki.php.net/rfc/nullable_return_types > > At least, it has up to date implementation. > > We discussed this internally 2-3 weeks ago, and my politeness (or/and > stupidity) allowed you to pass your version for common discussion. > Now I can see your real reason :( > > Both "Union Types" and "Nullable Types" may make sense, and both should be > voted at the same time. > Tomorrow is time to start voting. Right? > > Thanks. Dmitry. > > > ________________________________________ > From: Levi Morrison > Sent: Tuesday, April 26, 2016 02:37 > To: internals > Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types > > Internals, > > Joe Watkins and Bob Weinand have worked out a [proof-of-concept patch > for union types][1]. Please go download it and experiment with it. > > A few things to note: > > * This patch includes intersection types. However, a type expression > must be either a union type or an intersection type; it doesn't > support both such as `Array | (Countable & Traversable)`. > * This patch adds `null`, `true` and `false` for type declarations. > * This patch includes conversion rules for weak types. > * It does not have short-hand for unions with null (`?Foo` being `Foo | > Null`) > > These features (or omitted ones) are not necessarily what will be > voted on. Rather this patch allows us to experiment with these > features in code. This experience should be helpful for us to solidify > how we actually feel about these features. > > I especially would like people to try out the conversion rules for > scalar types as it has been a point of discussion. > > [1]: https://github.com/php/php-src/pull/1887 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c0775bc703794053163e4b4--