Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83167 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76654 invoked from network); 19 Feb 2015 10:04:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 10:04:30 -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 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:46403] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/A7-22021-C25B5E45 for ; Thu, 19 Feb 2015 05:04:29 -0500 Received: (qmail 12935 invoked by uid 89); 19 Feb 2015 10:04:24 -0000 Received: by simscan 1.3.1 ppid: 12929, pid: 12932, t: 0.0810s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 19 Feb 2015 10:04:24 -0000 Message-ID: <54E5B527.9070307@lsces.co.uk> Date: Thu, 19 Feb 2015 10:04:23 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54E564E0.4040901@birkholz.biz> <54E56A23.9060305@birkholz.biz> In-Reply-To: <54E56A23.9060305@birkholz.biz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC-Discuss] Scalar Type Declarations v0.5 From: lester@lsces.co.uk (Lester Caine) On 19/02/15 04:44, Dennis Birkholz wrote: > I just saw the reddit where you mention that v0.4 is practically > abandoned now, so I will just renounce my previous mail! DO NOT USE OTHER CHANNELS! With the large number of secondary channels the only place that suggestions like that should be made is here and as far as I have seen both ideas are still 'active'? But I do find it crass that there is now a different document with no reference to the v4 history! What does need unravelling is just which bits go with which discussion across all of the areas. I'm still looking at how any of this applies to the values in the arrays I'm passing around and just getting more and more confused. What I think I want is a set of functions to replace all this casting mess. Rather than is_bool ... as_bool similarly as_int64 rather than getting an automatic float. I want to ask to look at a variable in the array as the type I need for the job in hand now you may say that is 'casting' but you are not providing me with the casts *I* and many other database users need. I can see the 'advantage' of optimizing code via this strict stuff that some people want, but I don't see that has any place in a 'run only' version of PHP. If you want to compile the code then use a port of PHP that is compiled. Leave those of use who prefer the more dynamic system which may well have to deal differently with a scalar variable depending on what is returned at runtime. On the minus side of this drive to 'optimize' the code is the potential for completely different code on 32bit systems over 64bit ones. If the number is below 32bit then a completely different set of code gets used using only 32bit instructions. This may well be good for speed, but can introduce cross platform differences that may be difficult to debug. We currently live with those problems already with the int->float agro on 64bit numbers. -- 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 Rainbow Digital Media - http://rainbowdigitalmedia.co.uk