Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10173 invoked from network); 7 Aug 2013 20:35:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2013 20:35:12 -0000 Authentication-Results: pb1.pair.com header.from=bohdan007@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bohdan007@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.171 as permitted sender) X-PHP-List-Original-Sender: bohdan007@gmail.com X-Host-Fingerprint: 209.85.128.171 mail-ve0-f171.google.com Received: from [209.85.128.171] ([209.85.128.171:51203] helo=mail-ve0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/00-06453-F7FA2025 for ; Wed, 07 Aug 2013 16:35:12 -0400 Received: by mail-ve0-f171.google.com with SMTP id pa12so2378990veb.16 for ; Wed, 07 Aug 2013 13:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+ypIAuD62eyZ1PEn9U3ZrIC9cNynhmwgAouOSgq0060=; b=cYCOs30SyaVG3z4QH/NmRnaKs9RxFZo+Y18KopRvHhgUNCQuJKTZvcKEZAwKGo94QQ gQc8R6BtJqD7AoXywjSMdw1m6MhW21lnjB/v0Qnr4xwvYkAbsPcj27/zW8qezsjmzYI0 oJOxV+9j0dfb5DtgslWkAg8CTmJ3+QLIYkNIUAVW22fROE6acmIzvP4PIXFo80GOhV8g mPrxNlQgV0M2eP75YprqBfD6X9V8dD5RWGiKISlkAI0PBe56Z5Lpx9CDpwiED5BpmWIu v2uf2KFN5HLLQ9ij5Q1FjstlFk/lIT9uavcdUJx6RC5iDqrjB/5GLE6wKwnXuXZDra5s YafA== MIME-Version: 1.0 X-Received: by 10.220.69.71 with SMTP id y7mr2303973vci.40.1375907709418; Wed, 07 Aug 2013 13:35:09 -0700 (PDT) Received: by 10.59.0.193 with HTTP; Wed, 7 Aug 2013 13:35:09 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Aug 2013 23:35:09 +0300 Message-ID: To: Levi Morrison Cc: internals Content-Type: multipart/alternative; boundary=047d7b3a84524384ae04e3617a07 Subject: Re: [PHP-DEV] SPL Binary Tree, Graph From: bohdan007@gmail.com (=?KOI8-U?B?4s/HxMHOIOvV2sXNwQ==?=) --047d7b3a84524384ae04e3617a07 Content-Type: text/plain; charset=ISO-8859-1 Hello Levi and core devs, I think it's better not to invent a wheel but rather extract best practices from time proved projects such as Gremlin, http://erldocs.com/R15B/stdlib/digraph.html looks not bad as well. Definitely there are a lot of bright minds among PHP core developers and PHP community and they can vote for/define Graph API for PHP if they would have such a willing. BTW i was talking about Trees too and Binary in particular. If you think i just bother you and waste your time, please ignore me and continue to do great job improving PHP. Best regards, Bohdan 2013/7/19 Levi Morrison > > I would like to ask you what is your opinion about implementing Binary >>>> Tree >>>> and Graph data structures in SPL in addition to existing ones? IMHO it >>>> would be great because that will prevent from inventing a wheel all the >>>> time, and prove that PHP is full featured language like C#, Java, ... >>>> >>> >>> Convince me with use-cases; I don't think proving that we're as >>> "full-featured" as C# is helpful, healthy or necessary. >> >> > > Use cases I can think about are social, network, geographical, connected >> flights graphs, work with hierarchical data like corporations structures, >> products categories, indexing objects tree stored in memory/cache and PHP >> web applications representing those relations and solving common problems >> (has connection, shortest path, MST, recommendations in social graph, >> search) >> > > If you can extract a useful, common API for all of those tasks then I > would definitely support implementing Graphs in the SPL. > > Maybe in a real world, because of PHP performance it probably will not be >> so effective anyways > > > If we end up putting graphs in the SPL then performance would be a big > reason to do so; it would be written in C. > --047d7b3a84524384ae04e3617a07--