Hacker News new | ask | show | jobs
by matsemann 2082 days ago
I thought about that video today when integrating with an old SOAP API. I need to find the name+some property of some persons. Instead of having a list with [(name1, prop1), (name2, prop2),...], I get two distinct lists of [name1, name2,..] and [prop1, prop2,..]. In practice I think the lists will always match. But there is nothing stopping them from not being the same length, or even worse: one having a gap..
1 comments

Put an assertion. It's better to throw early rather than dealing with wrong data later.