Benedikt writes:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think a good general purpose graph library is tricky though:<br>
- There are lot of variants of graphs (trees, bipartite, acyclic, undirected, simple, edge labeled etc.), hard to find adequate and easy to use abstraction.<br>
- There is no single &#39;best&#39; implementation (mutable vs. unmutable etc.).<br>
- Its hard to find good traversal and zipper abstractions, though fgl has some nice ones.<br>
- The complexity of algorithms varies greatly depending on the particular kind of graph.<br>
Anyway, that&#39;s why it is challenging and interesting.</blockquote><div><br>Hear, hear!<br><br>From what I can tell, fgl is the closest thing I&#39;ve seen to a usable remotely-general-purpose graph library in any language. With all apologies to Siek, et al., the boost graph library is exceedingly complex, to the point of being unusable (one man&#39;s opinion) to all but the most ardent lovers of C++ template metaprogramming. That&#39;s no knock on its designers, it&#39;s just that the graph problem provides an exceptionally challenging tension between managing complexity and providing acceptable performance--on top of trying to achieve respectable generality.<br>
<br></div></div>It seems to me that anyone who aspires to author a Haskell graph library that can be regarded as canonical really ought to first know fgl inside and out, and probably ought to consider extending that library, vs. starting from scratch.<br>
<br>In fact, it was my current work with
non-trivial graph problems that ultimately led me to justify switching
to using Haskell for my day job a couple of months ago (after having
investigated and abandoned other possible solutions in other languages
that would have been a much easier sell to my higher-ups). So I have a pressing professional interest on hearing others weigh in on this topic, and particularly on the benefits/shortcomings of fgl.<br><br>I&#39;d especially like to hear from Martin Erwig on this topic. Martin? You listening?<br>
<br>--Tracy<br>
<br>
<br>