Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44904 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14226 invoked from network); 10 Jul 2009 13:23:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2009 13:23:29 -0000 Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 213.152.38.186 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 213.152.38.186 freshmint.phcomp.co.uk Linux 2.6 Received: from [213.152.38.186] ([213.152.38.186:63314] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/98-23850-FC0475A4 for ; Fri, 10 Jul 2009 09:23:28 -0400 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1MPG4S-000703-VT; Fri, 10 Jul 2009 14:23:24 +0100 Date: Fri, 10 Jul 2009 14:23:24 +0100 To: Alban Cc: internals@lists.php.net Message-ID: <20090710132324.GM19636@mint.phcomp.co.uk> References: <7.0.1.0.2.20090708224156.0ac5a438@zend.com> <312025EF-84D0-4411-A0A7-4F0379C3105F@pooteeweet.org> <13.B7.23850.208375A4@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13.B7.23850.208375A4@pb1.pair.com> User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] Type hinting - Request for Discussion From: addw@phcomp.co.uk (Alain Williams) On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: > Hello all, > > I don't understand why you focus on " Strict / Weak " question. It is really about: * type checking and enforcement or * type casting and generation of an error if the value cannot be converted cleanly Both of these have a value in different situations ... I would like to see both. The option of no checking/casting (as at present) should remain. > For me it's very simple, it's not obligatory use Type Hiting. Developpers > wants to write a weak code, they'll just have to not use Type Hiting and > developpers wants wrote a stric code they'll have to use it. > > After, choosing use or not Type Hinting when writing a librairy / > framework, this is not a php.internal problem. > It's a developper, designer, marketing choice ! Use or not use Type > hiting can help to chose a user target. And if you want be just between > weak and strict, " numeric " and " scalar " type hiting seems to be a > very good middle point. > > > +1 for Strict type hiting. (weak type hiting very similar to no type > hiting). -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include