Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69138 invoked from network); 23 Sep 2016 21:46:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2016 21:46:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=tendoaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tendoaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.45 as permitted sender) X-PHP-List-Original-Sender: tendoaki@gmail.com X-Host-Fingerprint: 209.85.213.45 mail-vk0-f45.google.com Received: from [209.85.213.45] ([209.85.213.45:33687] helo=mail-vk0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/63-51000-0D2A5E75 for ; Fri, 23 Sep 2016 17:46:57 -0400 Received: by mail-vk0-f45.google.com with SMTP id z126so2658722vkd.0 for ; Fri, 23 Sep 2016 14:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8iqmB8ihoHPAxstJ0phrqNLjQbBeFLi9ZLJFB+dgOs4=; b=0EZLqWhRNsR9vNnbfKcu0PK1yC7uOeMHScmyFa8cVuG0Q1cOUVb38q+7dwfYaLPNRt yvHEh0GvmvRq7HFcinJ/QlrKPhENLKoWnRmfW4OLqdTxqRmlqz9asSvKdpict+aB3vcY cw8IAJ9lRlifpDihE+HYdy2/ZY2OWa6HSRdG3GmfPI3pmiTXQk/aH754FMGcUXMc76c0 yp9/SOkXm0dp3EOr62LlgpX+nPuu95WzQ1BEpzVgfLX113Z3k9DjkTC1fbp5k7Ha7oRV aRsXWMesnHG73+BgHztktNUVAszuFwnH/cF2gTiJSlfl/8DIMEarZ0/+3D/alIT5hpAU ncyw== 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:from:date :message-id:subject:to:cc; bh=8iqmB8ihoHPAxstJ0phrqNLjQbBeFLi9ZLJFB+dgOs4=; b=B5MlUk9tUaoxfwKyeIR2AYk2tDtjFn4FTwZYonafzt8lEx/GwZ9dofWXTQQNhMUdFQ ra3FIzeUwszGif+AmKTOuN48/zVVlqJiSpl6JWPqxTd2nEFRvrOch0Fah2E+YrQ7iH2z WzWWyls9bhWhs9KTXNGlBTufFEl0jYqBgNdkcQD0tIJLyA/6UzhJwQVSpfWV2bBI0scd n2HWx3Xzuas+S7ToYA5/bMocXeZG7jtHCwgPxNWiq3GkOEx2icKcxfUSdzvxCUg+QrH4 U/v76xCCrZ0Mtvt7mgLWRof3vyBucW74MFrQVX9Ro8Mi6so7OGQIX4ic3vkFKOM0jPyW dYYw== X-Gm-Message-State: AA6/9Rlj6iChlSqxBGtjD2N2Aor5cn7+m75tvDvvLMqwxyu32MUz5CB3B7tXd1iYw77lYnGBevjUwXjgxR8peQ== X-Received: by 10.31.102.130 with SMTP id a124mr357256vkc.151.1474667214298; Fri, 23 Sep 2016 14:46:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.96.196 with HTTP; Fri, 23 Sep 2016 14:46:53 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Sep 2016 17:46:53 -0400 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a114df494786409053d33b750 Subject: Re: [PHP-DEV] [RFC] Namespace-scoped declares From: tendoaki@gmail.com (Michael Morris) --001a114df494786409053d33b750 Content-Type: text/plain; charset=UTF-8 On Friday, September 23, 2016, Nikita Popov wrote: > Hi internals! > > I'd like to propose the ability of specifying declare directives like > "strict_types" at the namespace level. > > The broader context of this proposal is to provide a simple and usable > mechanism that will allow developers to opt-in to stricter language > semantics on a per-library (or more specifically, per-namespace) basis, > thus alleviating backwards compatibility and library interoperability > concerns for such changes. > > https://wiki.php.net/rfc/namespace_scoped_declares > > I don't know whether this is the right solution to this problem, so next to > the specifics of this proposal, I'm also open to discussing alternative > approaches, as long such discussions can be held at a reasonably technical > level (i.e. concrete suggestions rather than vague concepts). > > Thanks, > Nikita > Aside from the issues already raised, implementing anything like this would require reworking how the engine handles namespaces. My understanding is namespaces are implemented as a set of string replace rules. The namespace itself is not a structure to php. This prevents things like class privacy, Java's notion of "protected" and so on. --001a114df494786409053d33b750--