Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11507 invoked from network); 18 Jan 2009 21:39:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2009 21:39:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=nrixham@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nrixham@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.33 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nrixham@gmail.com X-Host-Fingerprint: 209.85.219.33 mail-ew0-f33.google.com Received: from [209.85.219.33] ([209.85.219.33:62083] helo=mail-ew0-f33.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/FA-49574-C91A3794 for ; Sun, 18 Jan 2009 16:39:41 -0500 Received: by ewy14 with SMTP id 14so163767ewy.23 for ; Sun, 18 Jan 2009 13:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=qtL5jl7YNlXUz/tusbs+FDt6HhISm738zL5rPqc2AKM=; b=WX5ho2DjUPPC6FUv8Df0HMnR5HSU4i0hk/S2RvpBVX0PsMRasMQ58qYqqvXQ1cPiud kSdiHOMGBG/1wHN5EnrYHf7KS5tEM518UsbG4L8+UKAdGOj8+WbjMc6EHpx4zKamR10h 8vrp/FabShEr8aeYGpSz3NKUYWKA+LeaZs/Yc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=AHvHF79jj9jCgeO70d/PpYJ5z1je5PYxruDRfHs3B1SyD2W/5fk/TEPUh71NdF05R9 NyJB6nAXSBo07rH93P2cru5DFNqWWgr6bESTu6B0tG2qT8BOxyzNgA4JLghePEeG+hCp jyJVMwN88odFGRjJ/u1U8uw8hFUEo7IKwXnbU= Received: by 10.210.109.10 with SMTP id h10mr6357360ebc.10.1232314777018; Sun, 18 Jan 2009 13:39:37 -0800 (PST) Received: from ?192.168.2.6? (82-41-135-70.cable.ubr02.grth.blueyonder.co.uk [82.41.135.70]) by mx.google.com with ESMTPS id z37sm6754177ikz.9.2009.01.18.13.39.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 18 Jan 2009 13:39:36 -0800 (PST) Message-ID: <4973A18F.1040808@gmail.com> Date: Sun, 18 Jan 2009 21:39:27 +0000 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Hannes Magnusson CC: Lukas Kahwe Smith , internals@lists.php.net References: <58.5A.41390.72012794@pb1.pair.com> <7f3ed2c30901181131x5f89eb55u3f25c75195d7279@mail.gmail.com> In-Reply-To: <7f3ed2c30901181131x5f89eb55u3f25c75195d7279@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Really Need.. From: nrixham@gmail.com (Nathan Rixham) Hannes Magnusson wrote: > On Sun, Jan 18, 2009 at 17:42, Lukas Kahwe Smith wrote: >> On 17.01.2009, at 18:06, Nathan Rixham wrote: >> >>> a: Optional Static Typing >>> I'm finding an ever increasingly need to be able to staticly type >>> properties, parameters, return types etc (in classes) I know there is type >>> hinting but it's just not enough to do what one needs. Additionally support >>> for staticly typing primatives. >> I am not a type hinting fan .. then again I think that PPP is mostly bogus >> for a scripting language as well. I would not mind this stuff if it would >> just all just throw E_STRICT's instead of E_FATAL. To me the point of a glue > > It doesn't throw E_FATAL. It throws E_RECOVERABLE_ERROR which doesn't > do anything. > E_RECOVERABLE_ERROR seems appropriate IMHO 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? examples (all optional, and syntax may differ): class Example { private TypeHint $var; } Example $var = new Example(); in addition the ability to type hint primatives/scalars/[type object] in the existing implementation: function(bool $flag) { } function(object $flag) { } This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing applications or new applications that did not use the functionality (in the same way the existing type hinting implementation doesn't) internals: can anybody confirm if this would even be possible and if so what the "cost" would be? regards, thanks / apologies where needed etc. Nathan