Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3042 invoked from network); 14 Jan 2015 15:25:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2015 15:25:59 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.45 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.215.45 mail-la0-f45.google.com Received: from [209.85.215.45] ([209.85.215.45:34262] helo=mail-la0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/23-19120-58A86B45 for ; Wed, 14 Jan 2015 10:25:58 -0500 Received: by mail-la0-f45.google.com with SMTP id gq15so8701090lab.4 for ; Wed, 14 Jan 2015 07:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=YthF81ocekH3z8DA5PRNujtIIwLH9Y9ldfum71XEn4I=; b=qD6tppUXuBnW3A9YSr38QlmHxdsamYjOSDw8U89hXWI686G4+RfE4AhN5/p9ow23kj 2R2fETkXEjYSEtHZ+ZZobuQR0FKl2kQ+X9pZNyhrJoBM+CGJD4CpeeYUjzBPAVPzcY6H Ux7pcHRcSHg86pDywwPnZNAJ7U4inrMXMDLfxDu3e+DT9RrXH4fpWV08o6f8m7lBCE65 8JFmts4seq+oJjMTG08UemA3oAvWYQiv5UhZGPrpFWaopoaa1gDNRogp7rpd1XSdiq5X N9/uxlCEzTAKVI35ykQo6AX0QP+uEedD+8YEYZHYzGJj6raAd58t6pNnIeoMHKRMRisF e5ug== X-Received: by 10.152.25.129 with SMTP id c1mr4548316lag.65.1421249155057; Wed, 14 Jan 2015 07:25:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.154.100 with HTTP; Wed, 14 Jan 2015 07:25:34 -0800 (PST) In-Reply-To: References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> Date: Wed, 14 Jan 2015 17:25:34 +0200 Message-ID: To: =?UTF-8?Q?Pavel_Kou=C5=99il?= Cc: Zeev Suraski , RQuadling@gmail.com, Andrea Faulds , Leigh , PHP Internals List Content-Type: multipart/alternative; boundary=089e0160bcb4064ebe050c9e5b3e Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: arvids.godjuks@gmail.com (Arvids Godjuks) --089e0160bcb4064ebe050c9e5b3e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2015-01-14 16:00 GMT+02:00 Pavel Kou=C5=99il : > Hello, > > personally, as a language user, I really dislike the idea of both > options for scalar type hinting to be the part of the language. > Especially since you would have to declare the strict typing in each > file (if you are going by 1 class per file in a bigger project, that's > a LOT of declare directives to write in the long run) and if you'd > forgot once, it would make the calling of methods somehow > inconsistent. > > I wish there was just one way to do it; I don't care if the weak or > strong variant is going to be accepted, IMHO most programmers will be > able to adapt to either of them. The weak version makes probably more > sense for PHP and how it handles scalar types (at least from userland > developer's standpoint), but either of them is better than no > typehints at all. :) > > PS: Personally, I find the "scalar" typehint idea useless and cannot > find a real use case for it. Richard, would you mind giving an > example? > > Regards > Pavel Kouril As a userland developer, have to agree with this message fully. -1 on the v0.2 version, the declare() approach is gonna make our job misserable after a few years when this gets adopted and misused by a lot of people... --089e0160bcb4064ebe050c9e5b3e--