Skip to content

Commit

Permalink
Respond to comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ploeh committed Jun 28, 2024
1 parent 118e759 commit 64e7662
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions _posts/2024-06-12-simpler-encapsulation-with-immutability.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,20 @@ <h2 id="comments-header">
</div>
<div class="comment-date">2024-06-27 6:42 UTC</div>
</div>

<div class="comment" id="388933ccbe5a4c71ba0b443a223e08ca">
<div class="comment-author"><a href="/">Mark Seemann</a> <a href="#388933ccbe5a4c71ba0b443a223e08ca">#</a></div>
<div class="comment-content">
<p>
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.
</p>
<p>
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.
</p>
<p>
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?
</p>
</div>
<div class="comment-date">2024-06-28 7:21 UTC</div>
</div>
</div>

0 comments on commit 64e7662

Please sign in to comment.