2 ms·
This might be, but state machines are so common in imperative code, you could say they are common idiom there also. Pattern matching over ADTs only drives trans
by seanmcdirmid 9y ago
This might be, but state machines are so common in imperative code, you could say they are common idiom there also. Pattern matching over ADTs only drives transitions; different representation of transitions can lead to different constructs being more convenient (e.g. if your transitions are just based on a finite set of values, you can use just dictionaries).
- jpitz 9y agoThat could very well be. My brain tends to map problems to ADTs with very low friction.