Hacker News new | ask | show | jobs
by onlyrealcuzzo 3 days ago
> If you're invoking your DB via C code, you will not get help with memory-safety.

Interesting. I didn't know C and Haskell were the only languages. I thought for sure there was at least one other memory safe language.

> If you're invoking via non-Haskell code, you won't get help with transaction safety.

Why would you not use transactions built into the database?!

You still did not answer the question...

If you can't do a transaction safely in any language besides Haskell... Then how do databases not written in Haskell do them all day everday?

2 comments

The "transaction safety" part is confusing. What they mean is if you use SERIALIZABLE, transactions need to be retried, so your code inside the xact should be idempotent. I guess this is safer in Haskell because there are no variables, but that doesn't stop your code from having other side effects.
>>>> they’re writing their code in languages which don’t enforce transaction safety

>>> So every database in the world not designed in Haskell can't do a proper transaction?

>> It's not the database, it's the lines of code making calls to the database.

> Then how do databases not written in Haskell do them all day everday?