5 ms·
Agreed. But it sounded like, in this case, you were using a list to represent that which would have been represented by a record in a statically typed language.
by jganetsk 18y ago
Agreed. But it sounded like, in this case, you were using a list to represent that which would have been represented by a record in a statically typed language.
I'm imagining you'd have some kind of Field record type, with isDisplayable and isModifyable fields. Instead of destructuring as a list (or tuple), you would explicitly look for isDisplayable and isModifyable.
But, of course, you could still make the same mistake in a statically typed language if you chose not to set up the data structure this way.