4 ms·
You can't compare SQL to Haskell like that. There are multiple b-tree implementations for Haskell that of course will not allow you to insert duplicate keys. T
by iso-8859-1 9y ago
You can't compare SQL to Haskell like that. There are multiple b-tree implementations for Haskell that of course will not allow you to insert duplicate keys.
There is even a real relational database system in Haskell that actually obeys the laws relational algebra, unlike SQL.
https://github.com/agentm/project-m36/blob/master/docs/on_null.markdown https://github.com/agentm/project-m36/blob/master/docs/on_nu...
- jeffdavis 9y agoIf you think haskell would make a good database language, you're probably right. It's a lazy, statically-typed, type-inferred, declarative language with tightly-controlled side effects -- just like SQL. But in its current form, Haskell is just not a DBMS. So, it must rely on a DBMS like postgres or mysql, and the semantics of the DBMS matter very much. And yes, I can compare SQL to Haskell, and I did a while back: http://thoughts.davisjeff.com/2011/09/25/sql-the-successful-cousin-of-haskell/ http://thoughts.davisjeff.com/2011/09/25/sql-the-successful-...
- marcosdumay 9y agoAn "algebraic data store" would be a very interesting piece of software. Bonus points if it's lazy and if you can store functions there too. Haskell creates some problems for joining different transactions into the same set of guarantees (like SQL does in optimist data sharing). But I'm sure there's some extension somewhere that makes the perfect data type for that possible - I just don't know about it.
- iso-8859-1 9y agoProject M36 allows for storage of functions: https://github.com/agentm/project-m36/blob/master/docs/atomfunctions.markdown https://github.com/agentm/project-m36/blob/master/docs/atomf...