Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4139 invoked from network); 1 Mar 2012 09:46:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2012 09:46:22 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.26.184 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.26.184 c2beaomr06.btconnect.com Received: from [213.123.26.184] ([213.123.26.184:8838] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/EF-46815-C654F4F4 for ; Thu, 01 Mar 2012 04:46:21 -0500 Received: from host81-138-11-136.in-addr.btopenworld.com (EHLO _10.0.0.4_) ([81.138.11.136]) by c2beaomr06.btconnect.com with ESMTP id GRG00250; Thu, 01 Mar 2012 09:46:18 +0000 (GMT) Message-ID: <4F4F456A.40602@lsces.co.uk> Date: Thu, 01 Mar 2012 09:46:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20111220 Firefox/9.0.1 SeaMonkey/2.6.1 MIME-Version: 1.0 To: PHP internals References: <4F4EE0C0.1050302@php.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0303.4F4F456A.0043, actions=TAG X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2012.3.1.85414:17:7.944, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, __CP_URI_IN_BODY, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1600_1699, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2beaomr06.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0209.4F4F456A.0113:SCFSTAT14830815,ss=1,re=-4.000,fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] Scalar Type Intentions From: lester@lsces.co.uk (Lester Caine) Pierre Joye wrote: > On Thu, Mar 1, 2012 at 3:36 AM, Sebastian Bergmann wrote: > usually does not work. >> > >> > 2) What you want to achieve is already possible through docblocks. > I am not saying that I like the idea of scalar type arguments, but you > keep saying that docblocks solve such issue. They are totally > unrelated to what is discussed here, they are documentations. They > have nothing to do with runtime information (The same concept applied > to the annotations, if you remember it). But one of the reasons given for wanting this is as simple documentation? Does providing more checks at runtime actually add anything when in many cases we already need to check for valid input anyway. I can't help thinking that in many cases people proposing this are working on a basis that the variables they are passing are fully nailed down as to what is in them? When in practice we are not passing well typed variables around - until they have been checked. It would be interesting to establish just how many developers already use IDE's which provide all of this hinting and more important detailed error checking which does not rely on adding anything more to the runtime engine. I kill most of these problems before the scripts ever get run anyway ... -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php