Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78254 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14724 invoked from network); 22 Oct 2014 22:14:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2014 22:14:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.217.180 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.217.180 mail-lb0-f180.google.com Received: from [209.85.217.180] ([209.85.217.180:54941] helo=mail-lb0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/D8-63701-B5C28445 for ; Wed, 22 Oct 2014 18:14:53 -0400 Received: by mail-lb0-f180.google.com with SMTP id n15so3561985lbi.25 for ; Wed, 22 Oct 2014 15:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rlY27Qz4BrBY6xY7xGb2thuoWHiE11+NHzaULR/INmk=; b=IZmBJtejsrA/Xjmk7mZ6hDm7x9yS3bvupesgq3B+I0+ijwFA0Z8mDRwwVQy/SQn7qY 57Zq5vEhQkAE5j74kOfPEBcKw8xDUuCVz7F8jX3BD5RMBvyfKxjOXXot9Mbk1d82naKz d70JIJgjvk/UUDMQqffpuSD2/Y7IrRmU3EhLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=rlY27Qz4BrBY6xY7xGb2thuoWHiE11+NHzaULR/INmk=; b=UrH7li5c7rkGNVBmE+CqL2fwwvxqG8O6JX0PhQke8zTFtrKvk+F5jtS8PRZJgS+U73 GcsTUYsdXkWWKSTqFhN/84XCE4DtpVYV+O/StK25D3dcOdIzuY5veFjkhmBXUM4mJgzY +V+pglWR/BuTF8M7+Yx+W7XSkGFXaBeztzQtHur+I3CnJ88wifTOa0vcqgtzilBQAMfg 6VIv//Iheh3xXknARyyqo+DIaRoLXsjrLwLg+V54Ur5VX0w9c9HUwmgbrm9fplBMgQWA P+ZY4BecL7UqEQIHO1Gpt9lYYw2fdPRIJl6ChRZyH5KGCD9rzZvpBuc2vaRRu4/CZimB N3uQ== X-Gm-Message-State: ALoCoQmAXsLZFVaq3iB2oE9E6Tb6ZGj3Rl3waa8m9cXN9omWBEc+kpuOwf1e3VE9LKzDJsASpXMg MIME-Version: 1.0 X-Received: by 10.153.7.107 with SMTP id db11mr828564lad.35.1414016088815; Wed, 22 Oct 2014 15:14:48 -0700 (PDT) Received: by 10.112.0.102 with HTTP; Wed, 22 Oct 2014 15:14:48 -0700 (PDT) In-Reply-To: <77c09d71b5ee91245640e414c320518d@mail.gmail.com> References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> <866A39C7-6F11-408D-8BCA-594BA22E8569@ajf.me> <5447682B.2080100@sugarcrm.com> <019325A5-4F82-4179-B4D7-29E5649B2616@ajf.me> <77c09d71b5ee91245640e414c320518d@mail.gmail.com> Date: Thu, 23 Oct 2014 01:14:48 +0300 Message-ID: To: Zeev Suraski Cc: Andrea Faulds , Stas Malyshev , Dmitry Stogov , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: narf@devilix.net (Andrey Andreev) Hi, On Thu, Oct 23, 2014 at 1:01 AM, Zeev Suraski wrote: > The RFC itself makes an assertion that fundamentally contradicts the notion > that these are 'just functions'. The RFC reads 'They also prevent any > suggestion of strict type hinting for scalar types, because if that were to > be added, users would simply use dangerous explicit casts to get around > errors and the result would be code that is buggier than it would have been > without type hinting at all.' While it doesn't explicitly say so, it's > clear that one of the goals of the RFC is make it easier for a 'strict > typing' RFC to be accepted in the future. This is a clear indication this > constitutes a fundamental change to the core language. I'd argue that it has the exact opposite goal - to be able to say "use to_string(), to_int(), etc; we don't need strict type hinting". Though, I'd also argue that this isn't a valid argument - it's a different feature. Cheers, Andrey.