Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27808 invoked from network); 29 Feb 2012 16:21:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 16:21:53 -0000 Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:44433] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/15-33921-0A05E4F4 for ; Wed, 29 Feb 2012 11:21:53 -0500 Received: by lahl5 with SMTP id l5so4571137lah.29 for ; Wed, 29 Feb 2012 08:21:48 -0800 (PST) Received-SPF: pass (google.com: domain of admacedo@gmail.com designates 10.152.113.136 as permitted sender) client-ip=10.152.113.136; Authentication-Results: mr.google.com; spf=pass (google.com: domain of admacedo@gmail.com designates 10.152.113.136 as permitted sender) smtp.mail=admacedo@gmail.com; dkim=pass header.i=admacedo@gmail.com Received: from mr.google.com ([10.152.113.136]) by 10.152.113.136 with SMTP id iy8mr792928lab.50.1330532508552 (num_hops = 1); Wed, 29 Feb 2012 08:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=7erhDx6/sWphpW0/RxdGPegfxoG6cGPCw8+o3U0+P24=; b=MM+kSof7lSwkeMZZh7kcXOd1ZFvVxHD2NS877+ghExIa8OXK8cFkqa+GLRVaeWgUt3 5YPgnAFerRNGK8hXrjFohbzseWiIloFM887ZbmRXWALWPHWtFS/NCeaM9r5OnGbMdUtS 68xq/IBA65bW4G3Y3moCk+ULbyHryoxtROlxA= Received: by 10.152.113.136 with SMTP id iy8mr649001lab.50.1330532508470; Wed, 29 Feb 2012 08:21:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.36.234 with HTTP; Wed, 29 Feb 2012 08:21:08 -0800 (PST) In-Reply-To: References: <1330357150.2159.30.camel@guybrush> <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> Date: Wed, 29 Feb 2012 16:21:08 +0000 Message-ID: To: Simon Schick Cc: John Crenshaw , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Scalar type hinting From: admacedo@gmail.com (Daniel Macedo) I agree with Simon on this: On Wed, Feb 29, 2012 at 08:58, Simon Schick w= rote: > I'd like to split this discussion in parts: > > =A0 - just type-hint in functions (as we have it with classes and arrays)= or > =A0 bind a variable to a strict type? > =A0 =A0 =A0- should it then also be possible bind variables to a specific= class > =A0 =A0 =A0or interface? > =A0 - should we go for weak or strong types? > =A0 =A0 =A0- the type-hint is also weak in one way because it accepts all= that's > =A0 =A0 =A0compatible with the given type. These make a lot more sense in terms of discussion and those who don't agree on having strong type implemented in the language core would probably see value in type-hinting like we have with classes & arrays (even if here we enter again in a strong vs. weak discussion). I for once agree it can be useful to have type-hinting for the other types, including throwing an error if there's loss of data in conversion. Although I'm not so sure about having strong types... Regards, Daniel Macedo