Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73474 invoked from network); 24 Feb 2015 12:40:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 12:40:25 -0000 Authentication-Results: pb1.pair.com header.from=martin.keckeis1@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=martin.keckeis1@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.176 as permitted sender) X-PHP-List-Original-Sender: martin.keckeis1@gmail.com X-Host-Fingerprint: 209.85.214.176 mail-ob0-f176.google.com Received: from [209.85.214.176] ([209.85.214.176:51683] helo=mail-ob0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/36-37184-8317CE45 for ; Tue, 24 Feb 2015 07:40:24 -0500 Received: by mail-ob0-f176.google.com with SMTP id wo20so43013831obc.7 for ; Tue, 24 Feb 2015 04:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tItV6MW9lOsUY3xupP3ezwNt73goT2k4wMSTCHG0lTw=; b=VBh3BhfByvVhVaC43V5A3cnItrjoKA8NCizzzwXKZ6i8N01t82PLL75Odc0iAIFFOi brKakScr+gjME26iBIws4ZTW/B666utY8/w5KJGJk9Cu9XdPbWtYzZuH0eGLv2Qu3oQv 3NzfESlRXgiI0Iay6qViFxfH+UGp22YIP4hygVYPWc0nhgPMWTPN2nRv5o8y20LnkAzT 2Jj6xb7SLyVr6Sy9qCpf7O4Oz1EyLC3t91L95OojS8LsIuKZXhpMlxEg4gl84IbxPwvH ShOd4nNB9X58eCSrsa5sihjlh3lo7mWdjGLxIRIaFYDCitqovlktJ13DzEpInveCW6lR E0QQ== MIME-Version: 1.0 X-Received: by 10.202.3.65 with SMTP id 62mr10410436oid.11.1424781621920; Tue, 24 Feb 2015 04:40:21 -0800 (PST) Received: by 10.202.232.205 with HTTP; Tue, 24 Feb 2015 04:40:21 -0800 (PST) In-Reply-To: References: <54EC5AD9.3040505@birkholz.biz> Date: Tue, 24 Feb 2015 13:40:21 +0100 Message-ID: To: Yasuo Ohgaki Cc: Dennis Birkholz , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113ba080750ab3050fd4d2d8 Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: martin.keckeis1@gmail.com (Martin Keckeis) --001a113ba080750ab3050fd4d2d8 Content-Type: text/plain; charset=UTF-8 2015-02-24 13:29 GMT+01:00 Yasuo Ohgaki : > Hi all, > > On Tue, Feb 24, 2015 at 8:04 PM, Dennis Birkholz > wrote: > > > Am 23.02.2015 um 19:15 schrieb Nikita Popov: > > > A second vote will decide whether to use a BaseException based > > inheritance > > > hierarchy. This vote uses a simple majority. > > > > I like this RFC and hope it passes. I am a little concerned about > > littering the global namespace. It would be preferable to have a single > > namespace that is reserved for all build in classes (like \PHP) that > > contains all classes like exceptions. The name BaseException seems to be > > a very common one: > > https://github.com/search?l=php&q=baseexception&type=Code finds about > > 14k matches, so this may be a huge BC break if the actual class name is > > not changed. > > > > It seems AbstractException is better choice for BC. > > > https://github.com/search?l=php&q=abstractexception&ref=searchresults&type=Code > > There are 661 matches, but most of them are using namespace unlike > BaseException. > > > Someone proposed to use namespace for all PHP functions/classes and > clean global namespace up. This gives us flexibility also. e.g Providing > compatibility to older functions/classes to mitigate BC impact. > > Use of namespace is BC by itself, but it may be better to consider > namespace > use for internal features. We don't have much time, so it may be for > PHP8... > > All "none" namespaced classnames are IMO reserved for PHP.... So if you develop an application/classes you (should) always prefix a vendor/project namesapce. But +1 for PHP8+ for a PHP namespace. For PHP7 please do not do too much at once. --001a113ba080750ab3050fd4d2d8--