in reply to Static checking

I can't think of a better discussion of typing issues than Dominus' Strong Typing and Perl talk. He knows a lot more about programming design than I do. In the talk, he argues that static typing (at least in C) is pretty much a failure. A very interesting alternative he brings up is a type-inferencing language like ML (or its variants). ML is a cool language if you have the chance to learn it, and I can attest to the fact that type inferencing really does help to avoid bugs.

In some senses, Perl really is strongly typed... at least in terms of scalars vs compound types. I seem to remember someone's sig around here that has a quote about Perl being strongly typed but not having many types. The best example of this is that a hash or array value must always be a scalar. Of course, Perl gives us references and does things like listification, so we hardly notice the distinction after a while.

In the end, I think it's really the polymorphism of the various scalar types (and not the lack of types) that lets us do all the things we love in Perl.

blokhead

Replies are listed 'Best First'.
Re: Re: Static checking
by hanenkamp (Pilgrim) on Nov 06, 2003 at 19:27 UTC

    Actually, I have done quite a bit of class work in SML/NJ and OCAML. However, I can't say that I like the languages much. It's so much structure that I have a hard time knowing what pieces to use to solve a problem.

    The book I mentioned above discusses language in a very ML-like way. It provides an interesting perspective, but it's too mechanical for being very useful to me in programming.