From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 24 Aug 2009 11:13:43 -0700 Subject: [sup-talk] In next: thread-view-mode labelling No method join for Set In-Reply-To: <1250727630-sup-3112@yoom.home.cworth.org> References: <1250714501-sup-3033@chigamba> <1250727630-sup-3112@yoom.home.cworth.org> Message-ID: <1251137007-sup-3974@masanjin.net> Reformatted excerpts from Carl Worth's message of 2009-08-19: > I've attached a patch that at least makes the crashes I was able ro > reproduce go away. Applied, thanks! > [*] Totally off-topic: This is one of the things about "dynamically > typed" languages that I've never been able to wrap my brain around. I > really like that with static typing I can trust the compiler to help > me be very thorough if I make a type change like this, (and catch all > the cases before shipping any code). Instead, here, there's a hard > task of exercising every possible code path (at run time) before we > know if there are any type errors still lingering. I've seen some > proponents of dynamically-typed languages argue that unit testing > should provide the same coverage that a statically-typed compiler > would, but I haven't seen that in practice. You're right, this is a classic example of the type of bug that would be caught with static typing. Unit tests are the canonical answer. I'd argue that unit tests provide better error checking than static typing, since they allow you to capture the exact set of errors you're interested in, rather than the set of type mismatches that a type-checker can detect. (IMO the two sets rarely have more than a very small overlap.) Unit tests are only useful, of course, if you write them. Sup doesn't have very many. I've made an explicit choice to spend my oh-so-limited Sup time adding new features rather than ensuring a rock-solid platform. The occasional bug like this is the price we all pay. But it's a matter of tradeoffs---I do believe that if I were using a statically-typed language, development would be significantly slower, and Sup would be nowhere near the point it is now. I have no proof of this statement, of course. And if anyone wants to retrofit some unit tests, I'm more than happy to accept them! -- William