[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Erlang type system and static vs. dynamic types
Jan-Willem Maessen wrote:
> Instead, the hope of static typing is to quickly and accurately catch
> a large number of fairly basic errors---type errors---allowing the
> programmer to focus energy on deeper bugs. Yes, many of those errors
> would also be caught simply by running the code. But then we must go
> through the tedious process of localizing the error and re-building
> the program, one type error at a time.
FWIW, I only find that process to be tedious when I don't have dynamic
recompilation. (That is, the ability to redefine anything, including
types, without loosing execution state because of stopping, relinking
and restarting.) And I haven't found that dynamic behavior in the static
type languages I've been exposed to in industry.
I'm also not comfortable about my program's correctness without knowing
which execution paths are not covered by my test suite. Again, I haven't
been exposed to such profiling tools in static type languages.
I wonder how much of people's feeling on "static typing is/is-not safer"
is based on the development methodology they are used to. People can't
imagine how the other side could possibly compensate for the absence of
the tools and techniques they are used to in a given camp.
I seem to recall that there is some empirical data (not a lot!) on
productivity between similar projects in, say, Lisp (CLOS?) and C
(C++?)[*]. I wonder if there is any similar data on bugs? (Hopefully by
equally skilled programmers that are equally versed in the tools
available to them.)
[*] Yes, I don't think of C as exemplar of a safely statically typed
language. Let's not go there...