top | item 45727612

(no title)

garethrowlands | 4 months ago

I'm unclear what you're suggesting here. Are you suggesting you couldn't write a POS in Haskell, say?

discuss

order

taeric|4 months ago

My idea here is that, in many domains, you will have operations that are somewhat definitionally in the imperative camp. OpenTransaction being the easy example.

Can you implement it using functional code? Yes. Just make sure you wind up with partial states. And often times you are best off explicitly not using the RAI pattern for some of these. (I have rarely seen examples where they deal with this. Creating and reconciling transactions often have to be separate pieces of code. And the reconcile code cannot, necessarily, fallback to create a transaction if they get a "not found" fault.)