7 ms·
Edit: It seems I confused dependant and algebraic types. Wouldn't you love the compiler giving an error when you write something that could result in illegal s
by Akronymus 5y ago
Edit: It seems I confused dependant and algebraic types.
Wouldn't you love the compiler giving an error when you write something that could result in illegal state? (Business rule violations for example) This is where such types shine. https://fsharpforfunandprofit.com/posts/designing-with-types-making-illegal-states-unrepresentable/ https://fsharpforfunandprofit.com/posts/designing-with-types...
- taeric 5y agoI actually meant my "looking forward" to be sincere. I've used tooling that can point out exactly where an injection attack is possible, and that was quite nice. That said, u expect more of these tricks in my tooling, not necessarily cuffed by me. Elsewhere I pointed to format strings checked at compile time for valid shape and arguments. This is actually common in lisps, ironically enough, and is akin to this sort of affordance. I have just also seen too many projects fail that thought they could get it all in the types. It is very frustrating.