3 ms·
And more: Suppose your types are Strings. And your plus operator can add "one" and "two", but fails adding roman numeral "I" and "II", my guess is you'll anoth
by wellpast 9y ago
And more:
Suppose your types are Strings. And your plus operator can add "one" and "two", but fails adding roman numeral "I" and "II", my guess is you'll another type/ADT into your static typing called RomanNumeral so that your type proofer will check you at compile.
Meanwhile I will do exactly nothing because my product manager says he doesn't care if the user types in roman numerals.
Which means I will be building my next business feature while you're still doing type math.
- tome 9y ago> my guess is you'll another type/ADT into your static typing called RomanNumeral so that your type proofer will check you at compile. Hmm, no. Why would you guess that? That makes no sense at all.
- wellpast 9y agoWell then what is your criteria for having a String that can represent both English spellings of numbers and a String that represents roman numerals. If you say "I choose just String. I.e., I overload String to contain both types of values. Then you are doing dynamic typing. So why in that case do you choose dynamic verification, but in other cases not? What is your criteria for when you choose static types versus dynamic types? Or do you just go by instinct?