From 64e7662611777b79acb3e103f5a1c46438606998 Mon Sep 17 00:00:00 2001 From: Mark Seemann Date: Fri, 28 Jun 2024 09:21:38 +0200 Subject: [PATCH] Respond to comment --- ...-simpler-encapsulation-with-immutability.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/_posts/2024-06-12-simpler-encapsulation-with-immutability.html b/_posts/2024-06-12-simpler-encapsulation-with-immutability.html index e0838c98..e73c6187 100644 --- a/_posts/2024-06-12-simpler-encapsulation-with-immutability.html +++ b/_posts/2024-06-12-simpler-encapsulation-with-immutability.html @@ -396,4 +396,20 @@

2024-06-27 6:42 UTC
+ +
+ +
+

+ Aliaksei, thank you for writing. I've never programmed in Rust, so I didn't know it had that capability. At first I though it was dependent typing, but after reading up on it, it seems as though it's not quite that. +

+

+ An exercise like the one in this article series is useful because it can help shed light on options and their various combinations of benefits and drawbacks. Thus, there are no entirely right or wrong solutions to such an exercise. +

+

+ Since I don't know Rust, I can't easily distinguish what might be possible drawbacks here. I usually regard making illegal states unrepresentable as a benefit, but we must always be careful not to go too far in that direction. One thing is to reject invalid states, but can we still represent all valid states? What if priority distributions are run-time values? +

+
+
2024-06-28 7:21 UTC
+