Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54539 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43165 invoked from network); 12 Aug 2011 13:54:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2011 13:54:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=juzna.cz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=juzna.cz@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.172 as permitted sender) X-PHP-List-Original-Sender: juzna.cz@gmail.com X-Host-Fingerprint: 209.85.210.172 mail-iy0-f172.google.com Received: from [209.85.210.172] ([209.85.210.172:51791] helo=mail-iy0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/71-40016-0B0354E4 for ; Fri, 12 Aug 2011 09:54:57 -0400 Received: by iye7 with SMTP id 7so2019705iye.31 for ; Fri, 12 Aug 2011 06:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=U7sJkjw+IcJZXhfutue5fYFnqHSIMbVkQf4R0R/DkHQ=; b=gAtfvVxJS625Oo4S3eRqPi8iG3yG17fNH6rIV2y+2LGaXrtEFy7FDAlMYuaINvWJ6o iib/DCcSCnHjkRe9w4l4p3kWng/JmOByoBGIdI13SdY4viPeKbojWeqvA5VOgBj416wM mxU0JMifpWuruZldgfrZHIH5LTxZ09DDLyYoY= Received: by 10.231.205.200 with SMTP id fr8mr1896676ibb.88.1313157294082; Fri, 12 Aug 2011 06:54:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.32.134 with HTTP; Fri, 12 Aug 2011 06:54:34 -0700 (PDT) In-Reply-To: References: <4E3D3275.9020903@rotorised.com> Date: Fri, 12 Aug 2011 14:54:34 +0100 Message-ID: To: Ferenc Kovacs Cc: Sebastian Krebs , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload* From: juzna.cz@gmail.com (Jan Dolecek) Someone said that it won't be that easy, because functions are searched within a namespace first and when they don't exist there, then are called from global namespace. Example: wrote: > On Fri, Aug 12, 2011 at 12:12 PM, Sebastian Krebs > wrote: >> Hi, >> >> 2011/8/12 Ferenc Kovacs >> >>> On Sat, Aug 6, 2011 at 2:24 PM, Ryan McCue wrote: >>> > Ferenc Kovacs wrote: >>> >> I would like to introduce this RFC which would provide function >>> >> autoloading through the spl_autoload facility without userland BC >>> >> breakage. >>> > >>> > Shouldn't the default type be T_CLASS|T_INTERFACE? >>> > >>> >>> sorry for the late reply. >>> judging from your reply and the conversion on irc with Etienne, I >>> think that the usage of the token constants are ambiguous(we have >>> different token constants for classes and interfaces as you mentioned >>> for example). >>> originally I chose this because this would be fully backward >>> compatible, but now I think that we should add new constants. >>> what do you think? >>> >> >> From the users point of view I don't care. It's just another constant. A= lso >> constants like >> >> SPL_AUTOLOAD_CLASS >> SPL_AUTOLOAD_FUNCTION >> SPL_AUTOLOAD_CONSTANT >> >> seems to be more obvious, because it reflects, that it belongs to >> spl-autoload. >> > > imo from the users point of view your suggested constant names are > much better, plus the T_* constants are provided by the tokenizer > extension, which AFAK could be disabled compilation time, and by > itself would be a bad idea to couple the two extension. > > so +1 for your suggestion, I will update the RFC, and check out how > hard would be to create a patch. > > -- > Ferenc Kov=C3=A1cs > @Tyr43l - http://tyrael.hu > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >