Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55327 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86136 invoked from network); 9 Sep 2011 08:14:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2011 08:14:28 -0000 Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-yi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:48628] helo=mail-yi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/70-18042-3EAC96E4 for ; Fri, 09 Sep 2011 04:14:27 -0400 Received: by yie16 with SMTP id 16so720071yie.29 for ; Fri, 09 Sep 2011 01:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yuEk+7/yg+pys8jBkVe0pYSh/uwu0aUg698e6Ijq8GQ=; b=cVJ0/gxN5P7kCd9DMRfQY1cbUkscWfJTmUTywUpZWF2Sis6utGvCPBw4LzsZXJTOAY Z6UJ3oqBS1Ve7SJAVBFkdwp3FP/l4BEyXDLp4pvzmK21iAnM/eb9HB3YjlCn+eQMX5rx PliTriiSHoBJDKFeJLbADvYfMk5cDH2h5PakI= Received: by 10.236.9.36 with SMTP id 24mr10246259yhs.17.1315556065104; Fri, 09 Sep 2011 01:14:25 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.236.63.201 with HTTP; Fri, 9 Sep 2011 01:14:04 -0700 (PDT) In-Reply-To: References: <4E39E89F.8060605@sugarcrm.com> <4E3A3643.2070305@toolpark.com> <4E3A4793.2070209@sugarcrm.com> <4E3A91E8.1020107@toolpark.com> <4E3ACA42.8000001@sugarcrm.com> <4E3BF930.9030701@toolpark.com> <4E3C5EDE.3030401@toolpark.com> <4E3D073A.9050709@toolpark.com> <4E412E3E.2@toolpark.com> <4E62443C.9010603@toolpark.com> Date: Fri, 9 Sep 2011 10:14:04 +0200 X-Google-Sender-Auth: sjPyMb5ECNPsAqQu4UPvT_ja_2I Message-ID: To: Etienne Kneuss Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf303dd264f1543f04ac7dc303 Subject: Re: [PHP-DEV] [VOTE] Weak References From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --20cf303dd264f1543f04ac7dc303 Content-Type: text/plain; charset=ISO-8859-1 > I don't understand how the code you just gave would be useful in practice? > Is that question for me ? If yes, which code are you talking about ? I've implemented a WeakMap class in the weakref pecl ext, see: > For ref: https://github.com/colder/php-weakref/blob/master/tests/weakmap_001.phpt I believe this better fit people's needs. Or did you have something else in > mind? Talking for me, that's cool ! Just one question about the interface : Javascript interface is based on a setter/getter rather than any kind of ArrayAccess. Does anybody has an idea if on this case, about ArrayAccess vs setter/getter ? For example, wouldn't people expect "foreach" to work when $wm[] access is possible ? Personally, I like the current syntax, it's short. I'm just wondering of any corner case exists? Nicolas --20cf303dd264f1543f04ac7dc303--