Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81596 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51889 invoked from network); 2 Feb 2015 16:28:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2015 16:28:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:46717] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/43-34915-D95AFC45 for ; Mon, 02 Feb 2015 11:28:14 -0500 Received: by mail-oi0-f42.google.com with SMTP id i138so44838336oig.1 for ; Mon, 02 Feb 2015 08:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/i2gyGupG+y1N1Ap8FH7q8x9wPRmyxSayYgzGQtJ2t8=; b=a8nh80flsvSEu0EAThJf/Z7C4X+I1a07QBBwIacpNAmnpxPJvG0tHVtuyXDt1yAT4O ND0OP5qiVV82MzzwzlddLhe6b1c0y8fdstQTu5EFqqvv4r/n8DDiE/hABKzXbihyzwSC wsFIYiZCAtH2SzSjZGxgtTAZmX5Su+3dbKak8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/i2gyGupG+y1N1Ap8FH7q8x9wPRmyxSayYgzGQtJ2t8=; b=MPeMHuONDBol8fJMxoF9Pi4CW0wjuGaukISRCPoVTdQ/y2huVXSpToztcbJjiBhtIP 02GH6Qf5TtQY4gqBCqV8du3eD7uf4G86/m7mWMXWl1D3TXH2LTCrPgBwdaB+iLkhUatb RC37UlcIoibM/LXuxL1mxyF/+ngdPd/ymV9nIyFoaqtSVvRzFei/hUXXfY37QNU+rmx1 C2+QxRFyl7Okh9ITFDc7WFJe6HRbMk8MfUzQN7y94kiz4eKuCT1c1aL3CndiYvsZQdUx zMdT/PKQLALrdjIgQF5K2kmqNE8yaa/YcklEKNsW6FIAW1jnciT76+Z7jPSSKbTA30nt 4jiQ== X-Gm-Message-State: ALoCoQmX+JHkXZpAC7NI7o/+VI7Xx+9futpt7esUjmpSIyTWDeNnfYj8oy4mkLHrSIt53W5r69uH MIME-Version: 1.0 X-Received: by 10.202.202.4 with SMTP id a4mr11834467oig.5.1422894490078; Mon, 02 Feb 2015 08:28:10 -0800 (PST) Received: by 10.202.214.205 with HTTP; Mon, 2 Feb 2015 08:28:09 -0800 (PST) In-Reply-To: <05215ABA-DB9D-4C0A-BAAA-938FF6B0EFAB@ajf.me> References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <54CF88BD.7050405@fischer.name> <05215ABA-DB9D-4C0A-BAAA-938FF6B0EFAB@ajf.me> Date: Mon, 2 Feb 2015 18:28:09 +0200 Message-ID: To: Andrea Faulds Cc: Markus Fischer , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: narf@devilix.net (Andrey Andreev) Hi, On Mon, Feb 2, 2015 at 6:17 PM, Andrea Faulds wrote: > Hi Markus, > >> On 2 Feb 2015, at 14:25, Markus Fischer wrote: >> >> - Since consensus on the strict mode does part the community (or, the >> greater community also outside @internals) my impression is that the >> current best way to move forward would be >> >> - get the rfc to only go for weak types for now >> - using the "cast-like syntax": function foo( (int) $bar ); >> >> and ultimately keep the strict type out for /now/ and try it at a later >> time, the "function foo( int $bar )"-syntax. > > I=E2=80=99m not sure that really works that well. It=E2=80=99s not a terr= ibly good compromise: If you want strict typing, you not only haven=E2=80= =99t got it, but even worse, you=E2=80=99ll be forced to deal with weak typ= ing if you use the wrong library, because the (int) syntax would be specifi= cally for weak types. It=E2=80=99s not really a compromise at all, actually= . > >> I'm actually not really in favor of just weak types, I would consider >> myself a "strict type" voter, but through the community communication >> here I saw a) the benefits of weak types hinting/casting b) without >> getting in the way of a possible future strict type (e.g. with the >> "non-cast-like syntax=E2=80=9D). > > Well this RFC tries to strike a different balance: rather than having the= chaos of some functions using weak types, others strict types, others both= , it just adds scalar types and lets you choose the behaviour that suits yo= u. It means weak typing fans can live in their weakly-typed world, and stri= ct typing fans can live in their strictly-typed world. That=E2=80=99s the i= dea, anyway. > > But I=E2=80=99m just going in circles at this point. :P > If chaos is what you call it - we want chaos. :P Cheers, Andrey.