note
kappa
You wrote:
<blockquote><i>
Occasionally, I'm told "strong typing helps prevent programmer error", with no explanation of how it prevents errors. (Okay, so it stops me from adding a string and an int. If I was adding strings and ints and expecting to get something useful, I have deeper problems than weak typing.)</i>
</blockquote>
Please consider this C code:
<code>
char name[] = "miguel";
int st_len = 0, namel;
namel = strlen(name);
st_len += name;
</code>
See my error (actually a typo)? See how gcc warnings (which are kinda weak strong typing) save my time?
160235
160252