Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106514 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36614 invoked from network); 10 Aug 2019 01:15:38 -0000 Received: from unknown (HELO mail-qt1-f179.google.com) (209.85.160.179) by pb1.pair.com with SMTP; 10 Aug 2019 01:15:38 -0000 Received: by mail-qt1-f179.google.com with SMTP id q4so225430qtp.1 for ; Fri, 09 Aug 2019 15:43:08 -0700 (PDT) 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=17VS4IcO48Qozz4cEp4X7hSEyOUO0ml54FKGjwq2G9M=; b=LkJM7NXmH0fAi4y4Ku2KqljPmWKA/L66phhfL4AkvzndhtMSU62VWAnvcyO+qsxD6T CcZAmtiRvYEZzzR8yWGmNT0mWtkZBcTfyOjn3L6Lbbiz4eHZFlngi6X4RKroxjZPRWSj 8zGKGkLJrUFWy2/JdscDhiU1YAXl+iJH1VJCz8EhwmWWcTREfCtg4DPPrykeZfIaRV8I SZKZijja021mF7QqrZiuXN755CFNUgeD+iiJVW4p+ZSOX5P5Ulrm6gV6Fzg5WcaVh9sH Y5lM6LEx5F1du4nscNjjQbq6Urpol9j33dp7hqLEJCtU5pyQ1Vl5DanXj9dDkbtRmi66 J4wQ== X-Gm-Message-State: APjAAAXP1YSyQrLvle20ijlu4RReAPdPDlWnDZErJglcbVdcSjG2Mj3b t8krv85DX6mGWdJbJtlADZb09tc4XOFvhaMgTq5wIQ== X-Google-Smtp-Source: APXvYqzXXBFKf3WJUm9FnK4b66Juq046zHbNbKMu10xnPLsKjagf8BU9afLqOthxTcLsTrKrltnDcIkcdHQxMjl+YjU= X-Received: by 2002:a0c:81b8:: with SMTP id 53mr19789887qvd.91.1565390588364; Fri, 09 Aug 2019 15:43:08 -0700 (PDT) MIME-Version: 1.0 References: <5d4de5e8.1c69fb81.64aeb.560fSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5d4de5e8.1c69fb81.64aeb.560fSMTPIN_ADDED_MISSING@mx.google.com> Date: Fri, 9 Aug 2019 17:42:56 -0500 Message-ID: To: Mark Randall Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f45bb4058fb6e56f" Subject: Re: [PHP-DEV] P++: FAQ From: pollita@php.net (Sara Golemon) --000000000000f45bb4058fb6e56f Content-Type: text/plain; charset="UTF-8" On Fri, Aug 9, 2019 at 4:30 PM Mark Randall wrote: > On 09/08/2019 22:02, Sara Golemon wrote: > > 2. Strict(er) typing - I'm not sure, on the surface, what future > expansions > > we'd plan for in this area which couldn't fit into standard PHP in a non > > BC-breaking way. > > Union types and general reflection do spring to mind on this. I assume > any APIs using them would need to return more complex objects describing > them, rather than individual strings from getType(). > > Or maybe a string from getType() and an object from getTypeAnnotation() ? > Typed arrays are also another one which has been in high demand that I > imagine will present some BC issues if shared between stricter and > less-strict code. > > I don't see these (or Generics which you also mentioned) as being inherently incompatible between more/less strict codebases. Say we have an array or ValueObject in "more strict" code, we could refer to an unspecialized version of that as merely "array" or "ValueObject" in "less strict" code. Or even not refer to its type at all. Without a formalized proposal for how these are implemented, I'm not sure we can assume there will be technical challenges which we simply can't overcome. My point being, I'm not sure these things necessarily require a schism. We should be certain they do before we invest much time in figuring out the how of it. -Sara --000000000000f45bb4058fb6e56f--