Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94075 invoked from network); 9 Feb 2015 00:05:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 00:05:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:60202] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/6D-26926-6D9F7D45 for ; Sun, 08 Feb 2015 19:05:42 -0500 Received: by mail-qc0-f170.google.com with SMTP id i8so6103643qcq.1 for ; Sun, 08 Feb 2015 16:05:39 -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=/g4/O6SjdaMeflOLXBLMV8EfLK1cdAlhWRuSPErUTjA=; b=STVX2bNj+Pwi7ATGqnUKMAfyVKvH34UPcnlQU4OSC4U48SyhQwy3ueFllAtPkT9A0D 8U/FvSQJep3yALNXeYCxCuUa1idIRBu1VuO2KMIlPySH4Kag6P/Nkp6fcM9TjECmrQ5p 2EQTHskzRRyXm3fahP4EvhZQlSr8Bq/bo9F8OW16LtKNXvdF18GRWRLdB/CEvtz/gwnm 8q4z3fu8SFrs3BLohMyF8zh2bcBuFjG9jL8MpD4EeahQBcCOkQIh0RvyBbr+UeLXUfUm KeijiPfdPIjtoJKS6Ak1uiKR553NH3E4mpE6s8mpfzwtGflpUAwy4LxOTPRhywN7N/DO 9uQw== MIME-Version: 1.0 X-Received: by 10.140.102.165 with SMTP id w34mr34588017qge.26.1423440339694; Sun, 08 Feb 2015 16:05:39 -0800 (PST) Received: by 10.96.185.37 with HTTP; Sun, 8 Feb 2015 16:05:39 -0800 (PST) In-Reply-To: <54D7F1AB.1070302@gmail.com> References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <048c002a67c3d75afd802025b6946362@mail.gmail.com> <54D7F1AB.1070302@gmail.com> Date: Mon, 9 Feb 2015 07:05:39 +0700 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Syntactical change to Scalar Type Hints RFC From: pierre.php@gmail.com (Pierre Joye) On Mon, Feb 9, 2015 at 6:30 AM, Rowan Collins wrote: > On 08/02/2015 20:33, Zeev Suraski wrote: >> >> FWIW, while I think strict types - stricter than even strict languages - >> don't belong in PHP, this syntax is clearly a step up from declare(), >> which >> was definitely not intended for this purpose. > > > I'm kind of intrigued what purpose it *was* intended for. I've always found > it a rather odd part of the language, but this seems as logical a use for it > as any. > > For years, it had exactly one "execution directive", which worked in concert > with a runtime event handler (ticks=N + register_tick_function). In PHP 5.3, > a completely unrelated directive was added, to specify the encoding of the > file (something that more obviously has to be detected by the compiler). > > Was there an original idea of what it would be used for that never came to > fruition? Or is there something I'm missing that connects "ticks" and > "encoding", but excludes "strict_types"? Both are being done at compile time and modify how a file is compiled. So no, I do not agree with "runtime" here, while one directive is being used at runtime. -- Pierre @pierrejoye | http://www.libgd.org