Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111010 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26194 invoked from network); 15 Jul 2020 05:55:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jul 2020 05:55:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 77E9E1804A7 for ; Tue, 14 Jul 2020 21:48:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 14 Jul 2020 21:48:19 -0700 (PDT) Received: by mail-vs1-f44.google.com with SMTP id m6so394623vsl.12 for ; Tue, 14 Jul 2020 21:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QOmGt63EQUMXy1ScUeCCsL1E1M7SBnqcZrbydMV90yc=; b=fmL8L/+9V0kG/Yw2TB2kQcAb5TSTT4hS+16dHd+fi0ofyIwR53/S+2qU62TF7D/1Sj 25TLqBJSbh7baFjRjB6A8LNwArL9QbXITJTD5/K3dxdNZyCZwBDVYLLFIaMFAmJ3fpyX vvIiF9hUE18s0pvOWcnaf+V0WDbQ4lIAE0ZtcqHdpqS/HPgVoc3itnrIN4Bkciq4n4i9 b/fZvxA5gN8dfCCAyxTM3Qw6Ehcv8Mkd2kpXGvzqPPRuV0MBMS9UP2UR+qI6S2h/bqBP k4iipCFg2fC3xcUfG7LAbJbx+yEMWaabEm5B2Y3uJ3dUhA9YBLV0dIUKsNe4qFVvTI1F yK+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QOmGt63EQUMXy1ScUeCCsL1E1M7SBnqcZrbydMV90yc=; b=GqDP9dLeWVD4m1ELklm5LKKVNW3FiBk7JznmfqA5JzlyE4e1dKkPcUAVRhjNroex+l IAFoLK7MN5zOpYx4THNNYzhcTt6uq86rxBQtCBopJ4UqcNua1PFDiDjQOEU5gzHFpDge kpR96A8r9pwC07l1QQIUBoh0iniPka2i1nFf1agfOU05CzbcO4JDhX7CWGjmsqwPYdjM XvoL1M99wKtAmgAPMsU9eVtVvp0zSwitSls0pup9NI2maRjLQV9znukwU5VhjJrwOpzU l9lCs3joFwRQ5XvcDMr2MI56gnXynf2ihnFOQIQVoWCDPMZpKwoj5NPEWnQ2S/K58+GQ +Lbg== X-Gm-Message-State: AOAM530LhalIW9Fi+/zEaWLKZOie/0+E2itjnwbsfxjpE7M8O09Pi/ks +dfCA2x2akbFltghSkq9o8WeCOvEaR9+NDHVbbM= X-Google-Smtp-Source: ABdhPJxBWKpAIXNU1zWIZmVHpKCTtbuDjRbwGj5pC7tyDWGw9ngybkYmvcmIgSEBp2D3Qj9J8XB72fCHlYyFxPn59Eo= X-Received: by 2002:a67:1702:: with SMTP id 2mr5964499vsx.153.1594788496766; Tue, 14 Jul 2020 21:48:16 -0700 (PDT) MIME-Version: 1.0 References: <21C5073D-3F39-49DA-8686-E027AE780793@joshbruce.dev> In-Reply-To: <21C5073D-3F39-49DA-8686-E027AE780793@joshbruce.dev> Date: Wed, 15 Jul 2020 00:48:05 -0400 Message-ID: To: Josh Bruce Cc: php internals Content-Type: multipart/alternative; boundary="000000000000d7793405aa73a131" Subject: Re: [PHP-DEV] [RFC][Discussion] Objects can be declared falsifiable From: matthewmatthew@gmail.com (Matthew Brown) --000000000000d7793405aa73a131 Content-Type: text/plain; charset="UTF-8" On Tue, 14 Jul 2020 at 19:59, Josh Bruce wrote: > Implement an interface and magic method to allow objects to represent > false (or empty) while still be valid instances of the custom object (type). > > https://wiki.php.net/rfc/objects-can-be-falsifiable < > https://wiki.php.net/rfc/objects-can-be-falsifiable> > > If you saw the latest from this morning, not much has changed except > hopefully improved formatting and now being the official mix of things. > > If this is your first time, the cues are taken from: > > - __toString() > - Stringable > - and __toArray() (not accepted or approved yet) > > Thank you for all the feedback and patience so far, appreciate it! > > Cheers, > Josh I'm not sure I love this (mostly from a static analysis standpoint). It means that there would exist some `$foo` with the property that `$foo && !$foo` evaluates to true. That seems to be a bad place for a language to go, and it would increase the false-negative rate of static analysis tools. --000000000000d7793405aa73a131--