Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76654 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60616 invoked from network); 18 Aug 2014 14:11:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2014 14:11:57 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.175 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.175 mail-vc0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:39979] helo=mail-vc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/C0-54989-AA902F35 for ; Mon, 18 Aug 2014 10:11:55 -0400 Received: by mail-vc0-f175.google.com with SMTP id ik5so5730828vcb.20 for ; Mon, 18 Aug 2014 07:11:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=5r4sg0Qc8YlX/YA6KwPy+4fw2wOawjXeNvYdoQxq7og=; b=bpNt4KKCMyVtmKrSJmbXLL10/rq3I8Uf9aElrVQxv+d7UeHUPRzOGWvo1t5eYNVUok ty/qElwyY4GW+DnxykimvM056nJl727+CjYozkyEuMMLWcmAV4NhE7wQ0sRhgxAlePMy hE6QM1PjfcyI4KW1mCZgCiICR/e3TKimZM1ydihDx6/HrMl5ieSsJQ9whqMKKz8cgtIU CGkbQaNRSpeUbSw5sbogwzFI+a7UGfW8Br9qo5nUPVlaljyPUxN0YQ2bAVrQeSN9QdgL SYsL0bUV+Galo7y8kphK5bBSiXZWLjinXyIQRewlcEbXvYr+YCfJK6LwantqTUG35a8e 86Hg== X-Gm-Message-State: ALoCoQkF4U9kxDjRcRphb0nArxQtu5TS1WlpaDmJ3iXHF+GprvpTd8gNbxU1dtU766f637DtUQRt/ZGPE0qCtl6dRxZ2wp0kdpeDdiROD9ilAzVfGFcCe/1BgUwRFpDBT2mH2OC/fTZJ MIME-Version: 1.0 X-Received: by 10.52.230.164 with SMTP id sz4mr335531vdc.68.1408371112129; Mon, 18 Aug 2014 07:11:52 -0700 (PDT) Received: by 10.52.110.170 with HTTP; Mon, 18 Aug 2014 07:11:52 -0700 (PDT) Date: Mon, 18 Aug 2014 18:11:52 +0400 Message-ID: To: Andrea Faulds , Levi Morrison , Joe Watkins , ircmaxell@php.net, Nikita Popov , Xinchen Hui , PHP Internals Content-Type: multipart/alternative; boundary=089e010d911ed9d1e70500e7f3f6 Subject: Optional Type Hinting From: dmitry@zend.com (Dmitry Stogov) --089e010d911ed9d1e70500e7f3f6 Content-Type: text/plain; charset=UTF-8 Hi, What do you think about merging the following proposals into a single and consistent one: https://wiki.php.net/rfc/scalar_type_hinting_with_cast https://wiki.php.net/rfc/returntypehinting https://wiki.php.net/rfc/nullable_typehints I think it makes sense to keep syntax consistent with subset of Facebook's Hack to not make troubles to each other. I mainly interested in this feature from JIT compiler point of view, because once compiler knows primitive types of functions arguments and return values, it may generate much better code. So the solution must guarantee the types of arguments at function entry point, not the types of actual parameters (they may be auto-converted if possible). Thanks. Dmitry. --089e010d911ed9d1e70500e7f3f6--