Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72911 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62550 invoked from network); 4 Mar 2014 08:16:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2014 08:16:36 -0000 Authentication-Results: pb1.pair.com header.from=chobieee@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chobieee@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.169 as permitted sender) X-PHP-List-Original-Sender: chobieee@gmail.com X-Host-Fingerprint: 209.85.192.169 mail-pd0-f169.google.com Received: from [209.85.192.169] ([209.85.192.169:44997] helo=mail-pd0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/C5-13181-1EB85135 for ; Tue, 04 Mar 2014 03:16:34 -0500 Received: by mail-pd0-f169.google.com with SMTP id fp1so4837433pdb.14 for ; Tue, 04 Mar 2014 00:16:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ydfew7PPD2D0tyaS5zy6fSqss63kgpiePZuySVdPNT4=; b=z4pbrfY77b3wZwH5K8epYxOfyGZU9YWTheQy9L4A6qgZCoAQzGLjb3dhduwT4hiAr3 KDz6lzI8NYNtV/lK/8a0kQ/i2Vui3uSDMfXlEKSArILSYWmV+GWc4gMk98LM4nKcLPCZ vqdm+eRfffSvmpOmb42U7vrZ3PKjdLs9Sj+opmrl2ZIL9Xlqp5g+KG9bdiBhrRJ/Wsbp aLPxZqVvIKdnWOYmwtqVye+iEdTd1nX0tyjWBUJa5sbj8TpjTzmZYdbCXApDv+1Bhcgp Qh15Sp4iUmyQLDlNccjrFMKvKzBVLGzZaUrdFHK3KzTTYnbmJnT/c+EU2hGU3JLj/b/M A63w== MIME-Version: 1.0 X-Received: by 10.68.248.7 with SMTP id yi7mr16606189pbc.31.1393920991147; Tue, 04 Mar 2014 00:16:31 -0800 (PST) Sender: chobieee@gmail.com Received: by 10.68.204.198 with HTTP; Tue, 4 Mar 2014 00:16:31 -0800 (PST) In-Reply-To: <5307B1FE.1020604@marc-bennewitz.de> References: <5307B1FE.1020604@marc-bennewitz.de> Date: Tue, 4 Mar 2014 17:16:31 +0900 X-Google-Sender-Auth: iIjYuPUHEe16SL_edKWqsRJ5A5E Message-ID: To: Marc Bennewitz Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [php6] OOP resources From: chobieeee@php.net ("Shuhei Tanuma (chobie)") 2014-02-22 5:07 GMT+09:00 Marc Bennewitz : > Hi, > > here another idea for PHP 6 the simply means removing the datatype > "resource" because and convert current resources into classes/objects > as it's already done with GMP. > > Because resources are simply a pointer to a somewhere described data > structure - resources are the exactly the use case for objects. > > To be bc current resources should be instances of an interface > "Resource" and the function "is_resource" would work similar as > "$resource instanceof Resource". I prefer resource as It makes easier to implement bindings. I've maintained several extensions. one of the library has 500 approximates APIs. Imagine considering complicated OOP interface is really nightmare... To encapsulate resource data structure to object isn't bad idea. but zend_list_insert is more convenient than zend_object_store_get_object, isn't it? I think ambiguity is one of good point of PHP.