news.volyx.in

The hunt for the missing data type (hillelwayne.com)

690 points by todsacerdoti · 896 days ago · 254 comments on HN

Article summary

The article discusses the lack of built-in graph support in mainstream programming languages, despite graphs being a fundamental data structure in software engineering. The author attributes this to the numerous design choices and tradeoffs involved in implementing graphs, including the type of graph, representation, and algorithms. The article also highlights the importance of performance considerations in graph algorithms. As a result, graph support is often left to third-party libraries, which can be limited or slow.

Main themes

  • Graph data structures
  • Programming language design
  • Performance considerations
  • Algorithm complexity
  • Software engineering
  • Data representation

What commenters say

  • Some argue that object-oriented languages already provide a syntax and semantics for graphs, with objects as nodes and fields as edges.
  • Others propose that a generic graph type is not necessary, as graphs can be represented using existing data structures such as pointers or numeric indices.
  • There is a suggestion that languages should provide multiple graph types to accommodate different use cases, similar to how they provide multiple associative map implementations.
  • Some commenters believe that the complexity of graph algorithms and the need for performance optimizations make it difficult to provide a one-size-fits-all graph implementation.
  • It is argued that graph libraries can provide a range of graph implementations and algorithms, but may not be suitable for all use cases.
  • The idea that graphs are an abstract concept and that solving specific graph problems requires specialized graphs is also proposed.
  • Some disagree, suggesting that a graph data type would be useful, but it would require careful consideration of the operations and representation to be provided.
  • There is also a view that the lack of a built-in graph type is not a significant issue, as graphs can be implemented using existing language features and libraries.