Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31254 invoked from network); 22 Feb 2015 19:02:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2015 19:02:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.48 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.216.48 mail-qa0-f48.google.com Received: from [209.85.216.48] ([209.85.216.48:44077] helo=mail-qa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/02-18531-9B72AE45 for ; Sun, 22 Feb 2015 14:02:17 -0500 Received: by mail-qa0-f48.google.com with SMTP id dc16so19353312qab.7 for ; Sun, 22 Feb 2015 11:02:14 -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:content-transfer-encoding; bh=B6pGs9ii7Z8h1j/taqz/zl1rUydz945TkmqmD91g25U=; b=fztV4cfjP6UCuGbhYUGs04ZQX8UnYajkHejjBBWiFK/xR09Sys+ywA1xE+bZg33ubi hjXj+ivGCadCFlcJHIuqlVRVYtOog52f79/epyCDRqexidUU3Wmj4tVvF6IKZkdk1uID s4Oxy/M5nv1h5VMuQvufW7QUSdICB18H/YmpRNTW27F6bs1h7J0Ja5umLeODK5rOPrLK iWGaRtdXG4mj2HJK4TjR1mv1UBjmzz24vu6qsVhl/RnSRRAGlc/LkaA8Pt0PY2wk8+bn Vpv0eNdopr5HxfAwGLQGZRcQpZoRgiYREZI3LV8l88H76uCC5zPMyjNAXjmSEGQUhUrV fzvA== MIME-Version: 1.0 X-Received: by 10.140.234.198 with SMTP id f189mr18321144qhc.0.1424631733992; Sun, 22 Feb 2015 11:02:13 -0800 (PST) Received: by 10.96.160.99 with HTTP; Sun, 22 Feb 2015 11:02:13 -0800 (PST) In-Reply-To: <000601d04ecd$95545aa0$bffd0fe0$@tutteli.ch> References: <7ef509ef10bb345c792f9d259c7a3fbb@mail.gmail.com> <002101d04ea0$d92ea0f0$8b8be2d0$@tutteli.ch> <000601d04ecd$95545aa0$bffd0fe0$@tutteli.ch> Date: Sun, 22 Feb 2015 20:02:13 +0100 Message-ID: To: Robert Stoll Cc: Zeev Suraski , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Sun, Feb 22, 2015 at 7:30 PM, Robert Stoll wrote: > Hi Pavel, > > Yes, I am suggesting to make conversions behave the same regardless if it= is implicit or explicit. The only difference between the two should be tha= t one is stated explicitly by the user where the other is applied implicitl= y. Other programming languages behave like this and are more predictable fo= r users as well as developers because one does not need to learn two sets o= f conversion rules. > Actually this is not true. Other languages have differences between explicit conversions (aka casting) and implicit conversions as well. C# is the language I use the most after PHP, so I'll bring that one up (see https://msdn.microsoft.com/en-us/library/ms173105.aspx), but I believe other languages (probably Java?) act the same way. Regards Pavel Kouril