|
|
|
|
|
by kelseyfrog
1032 days ago
|
|
> What is the caret state in the middle? It is both column 1 and column 6. The author goes off the rails at precisely this point. The cursor state is column 1, the cursors return column is 6. Congrats, you've made a blog post about a problem that could be solved using a tuple. There's better ways to tack into the invalid states are unrepresentable mantra. For example, cursor column should never be greater than len(line[cursor_row]). How should such a constraint be encoded into the type system? |
|