Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39422 invoked from network); 29 Jul 2010 07:48:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2010 07:48:11 -0000 Authentication-Results: pb1.pair.com header.from=daniel.egeberg@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=daniel.egeberg@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: daniel.egeberg@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:34555] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/43-21430-B32315C4 for ; Thu, 29 Jul 2010 03:48:11 -0400 Received: by vws18 with SMTP id 18so48125vws.29 for ; Thu, 29 Jul 2010 00:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=0c0s6+vu9TPrJGIw4t0Zu3bTo8IipzX6FRmF4OBr680=; b=w29/k/7vmrLUNygyh6H4tyee+Q2n8dVGgJ2b8x7y/Fd7TTI3tXcHTWTj7u3F+k+ql1 v0iOATqI9kl7eNdkOVgpqfro4BRs8Evkg0pRjhdY85CY9Wfcp06DTb2P1RJNOegSzP2m Fu2tzKPVZRPGiyVpCHuwS4+5qUv0uCTObwRWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=uwbgfshN/hbORhT9pE/aACg0hR/SxBxMftTioS3PGNp7muFEo0dnF2lsqB521OTy+5 XxUscGOkkkly5sFTmHlhUoqgkHMErCMRm2+tNl93t8v3f+uZDZSzV6jURF0NW/UO5rFD TxNqJj30Cfz6RwOnPyZiqXvZyrFZfjnDgxp0w= Received: by 10.220.89.212 with SMTP id f20mr6965737vcm.120.1280389688280; Thu, 29 Jul 2010 00:48:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.46.135 with HTTP; Thu, 29 Jul 2010 00:47:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Jul 2010 09:47:38 +0200 Message-ID: To: Ferenc Kovacs Cc: Felipe Pena , internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Return type-hint From: daniel.egeberg@gmail.com (Daniel Egeberg) On Thu, Jul 29, 2010 at 09:43, Ferenc Kovacs wrote: > On Thu, Jul 29, 2010 at 3:49 AM, Felipe Pena wrote: >> Hi all, >> I've updated the patch and the RFC that proposes the return type-hint >> implementation (Engine + Reflection). >> The proposed implementation is working just like the last changes in the >> parameter type-hint (in trunk). i.e. working with the "scalar" and "numeric" >> pseudo-types. >> >> http://wiki.php.net/rfc/returntypehint >> >> Thoughts? >> >> -- >> Regards, >> Felipe Pena >> > > > Hi, I would love this feature. > But I have some concerns. > AFAIK you can declare classes with the name int ,scalar, etc. so > hinting anything else than class names can be ambiguous. > Or we have to set these keywords as reserved, so nobody could declare > classes with such names. Weren't they already made reserved with the parameter type hinting patch? > But in this case, this would be a big BC problem, especially, because > I think that there is many project out there which uses type > names(int, object, etc.) as classname. > > Try to search "class Object{" or "class Object extends" on google codesearch. > > Maybe this was resolved with the last scalar type hinting patch, which > got merged to the trunk, I don't know. > > ps: the spam filter rejected my previous email because of the > codesearch links... > > Tyrael > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Daniel Egeberg