Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98483 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63546 invoked from network); 11 Mar 2017 14:04:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2017 14:04:42 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.54 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.54 mail-oi0-f54.google.com Received: from [209.85.218.54] ([209.85.218.54:33922] helo=mail-oi0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/62-38004-9F304C85 for ; Sat, 11 Mar 2017 09:04:42 -0500 Received: by mail-oi0-f54.google.com with SMTP id m124so62656456oig.1 for ; Sat, 11 Mar 2017 06:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nf1O7TF4Dn0lnjvnr3O4Fm4sZNXzlB5JZ9TPFzDOPiA=; b=s1mWt2KD53uUIrTK6+BD9wvbw8KWX6O+3TahXD5jRphrNmAgF0vHb47auABZWLiCSm RYqvctvmFpB04pPHBTjYodE6VP/4UR+O8b5p295glTP+9y7xqWEc+oo+FdRO04X2dlFK 2IrJTphKHWtu7WT2UUTNNA5+tauVuf6NYGDVc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nf1O7TF4Dn0lnjvnr3O4Fm4sZNXzlB5JZ9TPFzDOPiA=; b=meJVKpHZ2zsYOwyKSxVtGJeQyrsKbe+eMwhkUms+48MigXu58DMxIQdrflP3Oea69W e6w2hK7lzGhINvQCF1P9XbdcqqMOLKk/wveTPtvlqUmzDiB1Sy0sqCcVCARx9QKi/2c+ 56EMo42fp94CjxJr+9BiXUJr/AAvgfoQpOr0ukxcU/0Jw5KOjPMGu+oYYdoDQJm9B4Mc 9FdcxYb6V3TZPD4S43Q7yVmzvVp1y/0p6/K3fJG71bCzPpKNfBVOM/ukem4i48dxWhH4 RRRFecLJQ64/o7Bg+z0Bdc3aAOnZJvmBgyhxkDHiref6etCHNU/NBRQOHwF4h/W6P2+/ Gz3Q== X-Gm-Message-State: AMke39lVJOf5ziApjTdeDW2wzgJIoMzoiZPzHAKm+2DY2JO9ceqNfxaLP4GRat0wesIy7w6QIjJIlCGX8bU7Xg== X-Received: by 10.202.244.82 with SMTP id s79mr11646958oih.184.1489241079134; Sat, 11 Mar 2017 06:04:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.242.83 with HTTP; Sat, 11 Mar 2017 06:04:38 -0800 (PST) In-Reply-To: References: <24efb0e7-b0e3-68ed-5f42-2d5481f8f291@gmail.com> <44add374-6c4b-399a-c542-8d7f100dfaa3@fleshgrinder.com> <2AB030D8-9677-4E0E-8215-07D77910E51B@gmail.com> <6BDFA788-B52E-42BE-8794-50959D3A81BE@gmail.com> Date: Sat, 11 Mar 2017 16:04:38 +0200 Message-ID: To: "internals@lists.php.net" Cc: Rowan Collins Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString() From: narf@devilix.net (Andrey Andreev) On Sat, Mar 11, 2017 at 3:57 PM, Fleshgrinder wrote: > On 3/11/2017 2:53 PM, Andrey Andreev wrote: >> I don't disagree with that in general, but strictly rejecting strings >> and other non-integer values would alleviate the problem for a >> majority of cases; i.e. would solve the 90% problem. >> >> What I strongly disagree on is that I should be happy with coercion, >> and the almost religious resistance against (non-overridable) strict >> scalar typing. >> > > From whom? Where are you getting this from? We are all in favor of > adding more types to the runtime to solve more use cases. We are all > just concluding that a stringable type should not be constrained to > string + object::__toString only. All your examples just help to make it > more clear that there is no benefit in doing anything other than that. > Oh, FFS! I stopped talking about __toString() 10 emails ago, and probably the 3 of us here are all thinking about different things now. I'm out.