Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95085 invoked from network); 23 Jul 2015 15:10:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2015 15:10:42 -0000 Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.169 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.160.169 mail-yk0-f169.google.com Received: from [209.85.160.169] ([209.85.160.169:35117] helo=mail-yk0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/33-03755-1F301B55 for ; Thu, 23 Jul 2015 11:10:41 -0400 Received: by ykdu72 with SMTP id u72so221939034ykd.2 for ; Thu, 23 Jul 2015 08:10:37 -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:content-type; bh=O465K63i27vqislk82LADQmpeirnrXqb6dJhGDaB5mQ=; b=unij581rh6dgc3c069C75tpPrEIjBJixnYy/4W3EMS+NQSWRLYdVrPYKxMUfu1f4lg yaGE0NVuebslN/42Zo891irnSzcHDKSZvvelWq0WXdVIDl4w5Vt8V1VE7ZvDY3HGDYWf z1rQcWS8BkLUZE7MrgWkwvJo7uAlbdCSyyAEu1hDabRSKT+1CcTFxkAFpocTOYxN3xzz Qd4vscPdUO1muUcwHcrw/hyA7qVndISjprVlnLVZ3qnU0I9sVeBGH4swajYq9rA++7wA hyzxWNqkry7d8YjzkOmnqz5+mrEtDdlZDpu0CKr3sARaaRyuEXQ7JRoyAdQEwQGXCoXj ZU9Q== X-Received: by 10.170.210.212 with SMTP id b203mr8833079ykf.110.1437664237768; Thu, 23 Jul 2015 08:10:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.36.7 with HTTP; Thu, 23 Jul 2015 08:10:18 -0700 (PDT) In-Reply-To: References: Date: Thu, 23 Jul 2015 12:10:18 -0300 Message-ID: To: "S.A.N" Cc: Patrick ALLAERT , Marcio Almada , Yasuo Ohgaki , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Voting choice for language changes (Was: "Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count") From: marcio.web2@gmail.com (Marcio Almada) Hi, you replied to the wrong thread ;) 2015-07-22 19:38 GMT-03:00 S.A.N : > I am satisfied, the possibility of group declarations, but the that lack: > > > use App\RestException\ // name "RestException", not imported to > current namespace :( > { > Gone, > NotFound, > BadRequest > }; > > ?> > > Unfortunately have to write so: > > > use App\RestException; > use App\RestException\{Gone, NotFound, BadRequest}; > > ?> > > It looks ugly and very strange. There is nothing strange on it (except, possibly, the trailing `\` which was discussed to death and voted). Even if we had no trailing '\' it wouldn't make any sense to import "App\RestException" when "use App\RestException{Gone, NotFound, BadRequest};" is used. > My proposition, the imported end name, if end of without slash. > > Like this: > > > use App\RestException > { > Gone, > NotFound, > BadRequest > }; > > echo RestException::class; // App\RestException > > ?> Importing from within a namespace is not the same thing as importing a class. I'd be against it. My 2 cents: why do you have "RestException" with "Exception" suffix and then don't have the same suffix on the other exception names? This unpredictable exception hierarchy is the "ugly" part and subtle alternative syntax won't make it better, IMMO. Marcio