Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49160 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36997 invoked from network); 29 Jul 2010 07:43:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2010 07:43:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:65104] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/B2-21430-B11315C4 for ; Thu, 29 Jul 2010 03:43:23 -0400 Received: by bwz11 with SMTP id 11so33412bwz.29 for ; Thu, 29 Jul 2010 00:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=cCNya/6Lotpqj2TAho2p85gTHCjZ9zToCTK84u2hjwI=; b=MHFjDSZeH0IoiKPTjSXgTOQtC0Vih6MOtORDsCBIKzHiv3+ocnQe/q1qWbWt7LLwWH UQodma6R7MVZQsGBfqfhqZsb9VUZlAwiSFc7cwJr6vFywoAUjdJzyvgrIeZCXIc7lGkx 8oWEbnzR7h9pHd3K3Dar0BN1LUIetMNuHhjBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=bKTxhT5uE7fiPQT+unLqYUa7PZkDJERMPpKh+Zs0pwbrRb3e0lje9SSWy1PdWfgfYc TBoHUlxJD0vSn4eopGHjItNnFOC+U+DYMRYbprIYfTDpRbbzNKlmVua6jwevFGUXoyxt 2h6ggSQLlz6R7ug+E8GNx1KJ9bBu6Lfo5E33Q= MIME-Version: 1.0 Received: by 10.204.180.75 with SMTP id bt11mr6641050bkb.115.1280389400314; Thu, 29 Jul 2010 00:43:20 -0700 (PDT) Sender: tyra3l@gmail.com Received: by 10.204.99.201 with HTTP; Thu, 29 Jul 2010 00:43:20 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Jul 2010 09:43:20 +0200 X-Google-Sender-Auth: Z0ND7RD6zZIx6HBGepMLkx89cfw Message-ID: To: Felipe Pena Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Return type-hint From: info@tyrael.hu (Ferenc Kovacs) 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. 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