Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83125 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54857 invoked from network); 18 Feb 2015 21:50:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 21:50:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-la0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:42941] helo=mail-la0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/1C-25021-52905E45 for ; Wed, 18 Feb 2015 16:50:30 -0500 Received: by labgf13 with SMTP id gf13so4076024lab.9 for ; Wed, 18 Feb 2015 13:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RdSSgvi7BtqBIPKqtYdCGEqnC7AxGcj3uKoYYBTs3wk=; b=rMF89+WwBdWgGDNoxNKinI8lUs9go1jYwGi3+mHq/in+rcVoBI9q6C3KqZFWCTbasS 1fDL1QEvyfwt++vXcrn6HygUtTDv4eeAT5Bhw8KTgh8GHcDRY605VLdjv2ejRKGHyRyY TqsCk1zcC2nCSG/ZbpESIh1ZjKPfaCKTwrNx/7C1ghFiiV8QynFNeI2Zvny0tpJw3uGq DJ3vUEu/3Fv0NDxx4TlJuxCPtj2pGfUrmyl/GKR4zsp+0Pet6wvXSyJo/CcrIqY/HDf4 g5cBfDcDWCbqRZb4RMhezjARhXBLsDZbtw3JOHJYA7UboHUYe6J7Uh4IgqYn0gWnEDcZ wArw== MIME-Version: 1.0 X-Received: by 10.112.170.72 with SMTP id ak8mr1121577lbc.95.1424296227016; Wed, 18 Feb 2015 13:50:27 -0800 (PST) Received: by 10.25.43.9 with HTTP; Wed, 18 Feb 2015 13:50:26 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Feb 2015 16:50:26 -0500 Message-ID: To: Leigh Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC-Discuss] Scalar Type Declarations v0.5 From: ircmaxell@gmail.com (Anthony Ferrara) Leigh, >> Internal Functions Like ceil() Return Unexpected Types > > My opinion is that functions should return sane types for their > intended purpose, and functions that do not should be "fixed". I agree 100%. I just think that's outside the scope of this proposal. >> Static Analysis Is Possible With Weak Declarations > > The advocacy of allowing `accepts_float(returns_int());` doesn't help > the cause of static analysers in strict mode. Java does exactly this and is statically analyzable. So...? > Still no mention of a way to enable strict by default. So lets try > some different rationale. If I personally want to develop in strict > mode, I can do that with this proposal, I can add a declare to the top > of every file and be as strict as I like. However not everyone else is > going to want to use my code in strict mode, so they will have to go > and remove some/all of those strict declarations. (Lets take callbacks > being evaluated in the context they are called rather than the one > they are created in). I would like a way of enabling strict by > default, immutable to scripts so that users cannot be forced into this > mode, and lets the radicals and the weaklings* play together in > harmony. I missed that discussion point, so I've just added it: https://wiki.php.net/rfc/scalar_type_hints_v5#why_not_add_an_ini_setting_for_default_mode > For the rest of the RFC, I either agree with or have no strong > opinions about the points raised. Thanks for the input :-) Anthony