Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94639 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36993 invoked from network); 22 Jul 2016 19:00:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2016 19:00:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=david.proweb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=david.proweb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.181 as permitted sender) X-PHP-List-Original-Sender: david.proweb@gmail.com X-Host-Fingerprint: 209.85.216.181 mail-qt0-f181.google.com Received: from [209.85.216.181] ([209.85.216.181:33158] helo=mail-qt0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/F8-24343-B5D62975 for ; Fri, 22 Jul 2016 15:00:43 -0400 Received: by mail-qt0-f181.google.com with SMTP id w38so67025643qtb.0 for ; Fri, 22 Jul 2016 12:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tMIXj9y3PyY7Zqi42BPsc5DSppGNOeX3lU0oxa5JK8s=; b=CkaLVuQVuFyoWfvGbfGghP+VVRsXzZtUQQVCdWowanB22UBVw7wPuCNEoCskGsriZ0 7DbK7Fs5u47xX4Vap8Ac6Ydrm2lCP0CakzrXUAGiP4FHBJ4CLSsU1gN92bLDXANAjMma dqpg//nBPyh8oeSKMmOB2KtltwgPL01yr00qtk/1aLmYDdAgbGln2USXSC2Kh2pFPOYA KV41y6JOatFDcQuiSQLiHuOtNYA14pROlD+AKl4lDD01Uw385fDxBGtk0mJGfhcoD9mV JpAYuDdIXij1ILl3i7tSUy0RSsIyyHUDpIYQKbcI8k4GXDkz8tVpG5IJgvR9jcmbRBGO SLgw== 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:from:date :message-id:subject:to:cc; bh=tMIXj9y3PyY7Zqi42BPsc5DSppGNOeX3lU0oxa5JK8s=; b=OmDQvj/VAPTs3Bs6O1Kz99zGmDqkqL/Tqd9GGMfO3hqho4XkHPYmrIleFpRvzoFSIL ryrsDcloIoWh/aLGLhZBvkbUMpENWVFC+pphz53t0/x7JEEo3QGJrbu/EqtQYpE/PqVT QURwGtl1iaNC/5fY13xW5be6I92LixVLwzkcO4qKwZq1232pepraA9Aw4l8RaY5MvW2N iMRRgU94K5PLsTyV5I3Ej5A1ULLgaPzbe2eVWRy74wTqs3lEAbL8Bl7EnQOz5ZWpmewL 5NS6MgvGhKgNxooV4LtyYJS2E9PUe5EB0p0i+JnJQzcyL640KVr124FrMsu7C2l9X8AG Uv+A== X-Gm-Message-State: AEkoouvGRuO9mMMmZn4C2dAbH8av60ArfnIe+Q0UYVwviClwnNNfgzWZpeRJGCUvLnYoeUs07NM4vCaA05y8PA== X-Received: by 10.200.48.193 with SMTP id w1mr8816162qta.8.1469214040149; Fri, 22 Jul 2016 12:00:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.45.67 with HTTP; Fri, 22 Jul 2016 12:00:20 -0700 (PDT) In-Reply-To: <1469202307.3729097.673942625.3A62CE90@webmail.messagingengine.com> References: <1469202307.3729097.673942625.3A62CE90@webmail.messagingengine.com> Date: Fri, 22 Jul 2016 16:00:20 -0300 Message-ID: To: Larry Garfield Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: lazy statements From: david.proweb@gmail.com (David Rodrigues) > However, that also means there's an enormous potential for race > conditions. Technically no more than closures now, but the use cases > seem like they'd make it more prevalent. If you "use" by reference, or > use a mutable object, or a service that depends on IO, etc. then the > resulting value of the lazy variable is not technically > non-deterministic, but will certainly feel like it to the developer. I think that lazy statements should not be used when you can have possibilities like that. It should not be a substitute to methods. So, for instance, if I have a mutable dependency, is better I create a method to do that, that could work better with that. I can think about how we can handle this, but I need a real case where this problem can exists. Can you help with this? Thanks!