Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106342 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42751 invoked from network); 30 Jul 2019 12:49:06 -0000 Received: from unknown (HELO poczta.brzuchalski.com) (188.165.245.118) by pb1.pair.com with SMTP; 30 Jul 2019 12:49:06 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id 7B6B9298423A for ; Tue, 30 Jul 2019 12:13:55 +0200 (CEST) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O-QmmqrQlD-c for ; Tue, 30 Jul 2019 12:13:50 +0200 (CEST) Received: from mail-oi1-f172.google.com (unknown [209.85.167.172]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 3B5F92984233 for ; Tue, 30 Jul 2019 12:13:49 +0200 (CEST) Received: by mail-oi1-f172.google.com with SMTP id g7so47493758oia.8 for ; Tue, 30 Jul 2019 03:13:49 -0700 (PDT) X-Gm-Message-State: APjAAAUP36Hw/SlRqMf48BS7HnfB/wrDo/rGTV/xL8MnKn1WUInksj4j /jblbQmjn9fA816FuB4ecrNWRj62OzUqPPMWqWw= X-Google-Smtp-Source: APXvYqz1vI5ne8rYCasdDZcZGcjMNFxlUjBAGZ35J0WcxUwpQ+mpYjCwxanKgKjikwPxQ4B4UavWYgpBMpLnVp+AKA0= X-Received: by 2002:aca:ad8d:: with SMTP id w135mr60286280oie.112.1564481628162; Tue, 30 Jul 2019 03:13:48 -0700 (PDT) MIME-Version: 1.0 References: <9ADC8994-9D3C-4810-A2DB-6FB81D513098@gmail.com> In-Reply-To: Date: Tue, 30 Jul 2019 12:13:35 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000b45498058ee3430b" Subject: Re: [PHP-DEV] Re: [RFC] Namespace-scoped declares, again From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --000000000000b45498058ee3430b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Rowan, wt., 30 lip 2019 o 10:48 Rowan Collins napisa=C5= =82(a): > I think there's some confusion here, because establishing the concept of = a > package as separate from a namespace is exactly what I proposed. > > Here's a previous message (technically in the same thread, but from 18 > months ago) where I also mentioned class visibility: > https://externals.io/message/101323#101390 > Was thinking about similar, a package with own identity and a way to declare autoload and other stuff. Was even thinking it could use a double colon which I've proposed way back in the same thread and with a delimiter in name all related symbols could be stored in package individual symbol tables, it won't collide with namespaced and global ones and would be easier to detect if tried to use an internal symbol in another context like other package or in global code. It could introduce a few more keywords like: * "package" - for declaring package name and declares, * "export" - for explicit declare of publicly available symbols which then could be detectable etc. for visibility features, * "expect" - for explicit declare of required dependencies Last two are for future features and the first one could be enough for shaping how it could look like. For eg. some of my thoughts https://gist.github.com/brzuchal/c45010f0dd20642b470eeee8b9c56c5f I know it's out of the main topic but IMO we should start another one and I'm pretty sure I've mentioned that earlier. If we wanna shape package for PHP then the separate discussion could be a good idea. --=20 regards / pozdrawiam, -- Micha=C5=82 Brzuchalski about.me/brzuchal brzuchalski.com --000000000000b45498058ee3430b--