Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44914 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44699 invoked from network); 10 Jul 2009 14:57:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2009 14:57:23 -0000 X-Host-Fingerprint: 90.49.49.49 ANantes-258-1-30-49.w90-49.abo.wanadoo.fr Date: Fri, 10 Jul 2009 10:57:22 -0400 Received: from [90.49.49.49] ([90.49.49.49:6914] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/71-37812-2D6575A4 for ; Fri, 10 Jul 2009 10:57:22 -0400 Message-ID: <98.71.37812.2D6575A4@pb1.pair.com> To: internals@lists.php.net References: <7.0.1.0.2.20090708224156.0ac5a438@zend.com> <312025EF-84D0-4411-A0A7-4F0379C3105F@pooteeweet.org> <13.B7.23850.208375A4@pb1.pair.com> <20090710132324.GM19636@mint.phcomp.co.uk> User-Agent: Pan/0.132 (Waxed in Black) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 90.49.49.49 Subject: Re: [PHP-DEV] Type hinting - Request for Discussion From: seza@paradoxal.org (Alban) Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit : > 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 Thank for your response ! I vote for throw an exception if data type won't match. Have one error when you make a mistake is better than have a silently casting which can transform your data in another form than what you want. And Exception is better than an Error because this give one chance to programmer for resolving the problem before program be halted.