Re: SPL Binary Tree, Graph

From: Date: Wed, 07 Aug 2013 20:35:09 +0000
Subject: Re: SPL Binary Tree, Graph
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-68405@lists.php.net to get a copy of this message
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 <morrison.levi@gmail.com>

>
>  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.
>


Thread (6 messages)

« previous php.internals (#68405) next »