Interview at Lang.NEXT
bearophile via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Jun 4 12:43:52 PDT 2014
Nick Sabalausky:
> In my experience, using heavy dynamic typing throughout a
> program creates far more work (mainly debugging) than it
> avoids. Even in tiny ~100 line programs, I've spent large
> amounts of time tracking down bugs a sane compiler would have
> immediately pointed out with a comparatively negligible amount
> of my effort spent on typing.
I think often this happens because you are trying to write
Python/Ruby code like you are using C++/Java, you assume the
compiler will catch certain kinds of bugs. If you write Python
with the kind of coding Python requires, taking more care of the
things the Python interpreter is not able to spot for you, you
will use much less time to debug Python code, and the overall
coding time will be quite low. In Python you write 2-3 lines of
tests every 1 line of code, and you test every functions for the
corner cases you can think of. You don't write more than few 3-6
lines of code without testing them immediately. So for certain
aspects you need more discipline to write Python, while for other
things it needs less. For small and medium programs this leads to
sufficiently correct Python code :-) It's usually quite hard to
explain such differences in coding stile to people that are used
to static typing.
Bye,
bearophile
More information about the Digitalmars-d-announce
mailing list