Skip to main content
3 events
when toggle format what by license comment
May 29, 2021 at 11:14 comment added ShreevatsaR That is, I think you're very right that the problems in both the "sandwich" examples I gave (unicode, and dates) can also be solved by being very careful and conscious and aware of what type of data you have at each point/zone in your code (and this is an important principle in general, e.g. for security)—e.g. annotate each Python function with whether it accepts bytes or unicode, or add type-checking—but I also feel this is a different (though clearly overlapping) solution to the problem than the main "sandwich" idea of consciously forcing the "inner zone" to be as large as possible.
May 29, 2021 at 11:13 comment added ShreevatsaR Thank you; this is clearly relevant and I guess it's inevitable that there will be overlapping ideas (thanks for pointing this out), but I think what makes the "sandwich" I described less broad than these "zones" in general, is the principle that although it is easy to have many zones, one gets better results if you design your systems by recognizing that one zone is "preferred", and are careful to make it as large as possible, such that there are exactly two zones: an "outside" (specifically, boundaries with external systems) and an "inside" (everything else).
May 29, 2021 at 10:44 history answered peter_the_oak CC BY-SA 4.0