Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96125 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76128 invoked from network); 23 Sep 2016 22:18:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2016 22:18:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.44 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.218.44 mail-oi0-f44.google.com Received: from [209.85.218.44] ([209.85.218.44:35788] helo=mail-oi0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/E4-51000-62AA5E75 for ; Fri, 23 Sep 2016 18:18:15 -0400 Received: by mail-oi0-f44.google.com with SMTP id w11so150244526oia.2 for ; Fri, 23 Sep 2016 15:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=rwW8TOxg45cRUJkEbWBc15DMndVyqb6sbVqCYDdyziw=; b=uaVd0nv8IF5IbiqJvZI3kq8Dv7jusxIOpuG5btyOzY9tpeeX/nyuzw+7oAktbI9K/9 ded8JEqU5xXlFIYgLZIxADBwV+YfXsOPODflex14pFriiS2+eCjbQyicXckWTtF30oDg FPt8rcJV9TQ/2vlELaGSbgMN9F1LQ7tfhMbUTu9k7T6xBncD3TW38DNt/qV+Tp1YM0Eb TYEeRt6hVAaXg0/VwTyy7I1xn0lz5zZBYQ8Ok6ZjeJYNcv7Ake9FZ+fWgQGPDfIc3kPI /9Rvx8LonPehSXxvtQHkqmlAlgnWhj8DtdxIRWKDlorF9RVlsgC85nvHbTwQVSQE760I VCBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rwW8TOxg45cRUJkEbWBc15DMndVyqb6sbVqCYDdyziw=; b=KiP8yViRin8ktumVb5MV0ve/3pLY/WHtWFjPBw6zvYQZR88zik65xiVXfbDiGEtB/c XWluwDmj0a0KO7VvmDtGs6OSWa5ffhcF9ME/vQrLXXrkPgXUxfK6OrRtwr5PkvKf+6bJ iulbqjotPd9rG3xn95CZ9tvMR/NCRVbZ9hjel8WWIgae5ywATwIib+eRJ9A2MwAfpgZZ dMQ6qlTpY7ARn47MFFtTGa/eRVjx4CSb+2fUdJzGwRLvJ73YzWTcUNRfcwNJQo+m/rJl brf6jCxmLldefwBZ4IVPxPwisVNC9iocb0/HLOKgjT3XCMmYgvTPii/AMHoMIPSU099t P2LQ== X-Gm-Message-State: AE9vXwMlMcs/wEibemonJ3o2LaCamLD21sfNS6Ho/X+hL2kOyX0+nrRHhUvq7TV/kmGidQ== X-Received: by 10.202.188.134 with SMTP id m128mr12669689oif.41.1474669091722; Fri, 23 Sep 2016 15:18:11 -0700 (PDT) Received: from [192.168.2.102] (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id 65sm2749126otq.39.2016.09.23.15.18.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 15:18:11 -0700 (PDT) To: Dan Ackroyd References: Cc: Nikita Popov , PHP internals Message-ID: <07b7455d-2538-f0fa-f8cc-ca4a53e7c5fc@gmail.com> Date: Fri, 23 Sep 2016 15:18:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Namespace-scoped declares From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > If you are concerned about libraries modifying how code is run, the > same theoretical problem exists with libraries that register > autoloaders - 'omg they can totally change what code is even going to > be run, let alone the precise semantic behaviour'. Autoloaders do not change language semantics. They just change one particular aspect, for which there is specific plugin interface. This is a proposal to have plugin interface for changing everything in the language, basically - which may sound cool initially, yay, I can make PHP do whatever I like - until you consider how these changes may coexist in a larger project. Loading a class is a pretty compartmentalized thing, but changing language semantics is not. Where it is - like meanings of operators - we cautiously allow _some_ plugins. But I think this one goes too far. The problem isn't even in bootstrap order and such - while all those are problems, they can be solved. The problem is you no longer know what each piece of code means and how it works. With classes, since you don't have all the classes in the same place, it's usually solved by having phpdoc - you're supposed to know which class does what by reading docs. With semantic changes, I don't know how you're supposed to know which one of 2**N combinations is currently active on this code. -- Stas Malyshev smalyshev@gmail.com