3 ms·
Agree, this is my approach. Also, I do checks on the data structure, less on how they are used. So if a function expects a certain structure I’ll spec that. B
by DigitalJack 9y ago
Agree, this is my approach.
Also, I do checks on the data structure, less on how they are used.
So if a function expects a certain structure I’ll spec that. But I don’t do checks on getter setter type operations.
- GlennS 9y agoI'd add that I think the correctness problems with (good) dynamic language really only start appear as the program gets larger. Dividing your program up into large chunks with rigorously defined and checked interfaces (e.g. using spec) does a lot to mitigate this. Meanwhile, you still get the benefits of dynamism (concise code tightly focused on the problem domain) within each module.