Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42688 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21224 invoked from network); 18 Jan 2009 22:30:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2009 22:30:30 -0000 Authentication-Results: pb1.pair.com header.from=surreal.w00t@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=surreal.w00t@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.22 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: surreal.w00t@gmail.com X-Host-Fingerprint: 209.85.218.22 mail-bw0-f22.google.com Received: from [209.85.218.22] ([209.85.218.22:42760] helo=mail-bw0-f22.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/BC-49574-28DA3794 for ; Sun, 18 Jan 2009 17:30:27 -0500 Received: by bwz3 with SMTP id 3so452bwz.23 for ; Sun, 18 Jan 2009 14:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=sxfrG6eFLqAVYdCvs7AsYVZq/iBeCq9AjvawSB3HYQ4=; b=A0jVHhxPU7DN8Ix5OJ2N9vFlbVzmhSpPdnUsWttqCD1ibukMEtuUjbacD5Kifgs2TY r4IrSbm9/w3mG8Yi58brD0J9SfV4QOqhu77OQ+CoPbLSA0LfibuIiHKXcA0WEDlUPymL 2eP8CpvQM9Dc7JTrdDsMflP9Vu48EaU316wd0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=pF5wE/aDOLFYfM8yiwChwf0jkjeH9j5f7uWbHXUa79NuWS2axY40hiEypPrVPgqi1m 36kq5xdUzbhmF/0ucSFnk1lu+xKHqO9/d3628wrYl008qRACkxSeISS5n04mCwmNOjqW Yd2r06nbBKthK6bJs7r/L5s0j9/JA3Fol7nbc= MIME-Version: 1.0 Sender: surreal.w00t@gmail.com Reply-To: viroteck@viroteck.net Received: by 10.86.93.19 with SMTP id q19mr3246591fgb.62.1232317823099; Sun, 18 Jan 2009 14:30:23 -0800 (PST) In-Reply-To: <4973A18F.1040808@gmail.com> References: <58.5A.41390.72012794@pb1.pair.com> <7f3ed2c30901181131x5f89eb55u3f25c75195d7279@mail.gmail.com> <4973A18F.1040808@gmail.com> Date: Sun, 18 Jan 2009 22:30:23 +0000 X-Google-Sender-Auth: 5103d14777bb2318 Message-ID: To: Nathan Rixham Cc: Hannes Magnusson , Lukas Kahwe Smith , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Really Need.. From: viroteck@viroteck.net (Robin Burchell) On Sun, Jan 18, 2009 at 9:39 PM, Nathan Rixham wrote: > I've reworded my original mail completely maybe this one will have more > feedback (or not) > > question: Would anybody else like to see, or feel the need for, *optional* > type hinting of variables and class properties in PHP? > I was involved on a thread on exactly this some weeks earlier. I (and a few others, though I don't really remember specifics) would very much appreciate the possibilities of proper code structure when working with large teams that this could help provide :) (As to your original proposal, multiple method signatures is something I've come across a need for *occasionally*, though personally, I'm not a big fan of the feature -- the one place I would like having it is __construct(). Say, you've got an ORM class which is derived for usage: class ORM { public function __construct(string $sPK) { // Fetch and populate based on PK } } class Person extends ORM { public function __construct(int $iID) { // Fetch and populate based on PK parent::__construct((string)$iID); } public function __construct(string $sNewName, string $sAddress) { parent::__insert(....); } } Yes, I realise that this can be done with retrieving arguments and the like, but for such purposes it's not the neatest solution syntactically.)