Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85590 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44249 invoked from network); 31 Mar 2015 15:19:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2015 15:19:28 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.182 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.217.182 mail-lb0-f182.google.com Received: from [209.85.217.182] ([209.85.217.182:36365] helo=mail-lb0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/C0-39077-DFABA155 for ; Tue, 31 Mar 2015 10:19:27 -0500 Received: by lbbug6 with SMTP id ug6so14987063lbb.3 for ; Tue, 31 Mar 2015 08:19:22 -0700 (PDT) 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=xVPLd5pkwPDydXrIkyewYteLU/NAq78YDeLzIaQlmgU=; b=PsZfaj//QJuCA9bAnHPG//UI4geVFTxrihHIbLRK6wJJIwLZy7x8NEOjuGEYlb020L BLygSOqr+mDSESXa26z8n/rJPE4ZuzNiQMHNW3rkNCVlHXSiqfz/AlVf7c3GjcScAwMv 0M9ur2pFT2p85AzUPK2l/dLOjzq1EDYrKRKZII5jOzexiRMKROXK9mIUxbJZk/mQokJ2 4uz0M3w2jrNQYX2aCbAtfx6uSOJfrvDq4EAM/R/V/5mx1It1phEbLLzJFwfHK32y1USH 8JoVbvckP4WlBI2KnOIiAB5PVql+kdyPvqdRxVQTmcY4mCNJXBFAmpEAJmLM3e1P/wxa AciQ== MIME-Version: 1.0 X-Received: by 10.152.1.194 with SMTP id 2mr31414243lao.38.1427815162499; Tue, 31 Mar 2015 08:19:22 -0700 (PDT) Received: by 10.25.144.15 with HTTP; Tue, 31 Mar 2015 08:19:22 -0700 (PDT) In-Reply-To: References: <3a939905cd5a06158c9e99d8af26e596@mail.gmail.com> Date: Tue, 31 Mar 2015 11:19:22 -0400 Message-ID: To: =?UTF-8?Q?Pavel_Kou=C5=99il?= Cc: Zeev Suraski , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Naming of 'weak' type hints From: ircmaxell@gmail.com (Anthony Ferrara) Pavel, > Hello, > > I would definitely stick with "weak"; it is common naming used across > many languages and textbooks. > > Also, why is the strongly typed mode named "strict" anyways? If > anything should change, it should be strict to strong, so PHP doesn't > look like a special snowflake. Strong has a very specific meaning, which PHP is not using. For example, Python variables are strongly typed (meaning it's restrictive about how types are intermingled). So while "x" + 3 in JavaScript (another weakly typed language) is "x3", in python it would be a type error (assuming "x" + 3). PHP's overall type behavior is still weak at the variable level. The difference is that strict type declarations require types to match at the point of parameter passing. But it doesn't make the variable strongly typed. As far as "weak", that's the description of the type system in general. However as far as type declarations are concerned, I think it would be fair to talk about the two modes as "coercive" and "strict". Anthony