[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic vs. static typing



> From:  Howard Stearns <stearns@alum.mit.edu>
> Subject:  Re: dynamic vs. static typing
> 
> Maybe the behavior of the marketplace demonstrates that the studies are 
> not, in fact, convincing.

I'm a little surprised that no one has brought up the fact that in the real
world (read "marketplace"), the ST/DT choice cannot be made in isolation.  For
instance, right now I use Ruby.  I like that the code is short and flexible, in
comparison to, say, C++.  The ST argument seems to be: "if you use Haskell or
ML, you'll find that your code is just as short (due to type inferencing) and
flexible (due to polymorphism)." Great, says I.  Unfortunately, I find that ML
and Haskell are functional languages, which I'm not comfortable in.  (And I do
literally mean comfortable -- the reason I use Ruby instead of Python has
nothing to do with the respective power of the languages; my brain just finds
greater comfort in the style of Ruby code.)

Furthermore, I like programming in an object-oriented style, and the OO
modifications to these languages (in OCaml or O'Haskell) seem like add-ons.

It appears that the functional, non-OO nature of type-inferenced languages is
not a coincidence.  From what I've read, standard HM type-inferencing seems to
be better-suited to functional than imperative style, and practical
type-inferencing in the presence of sub-typing still seems to be a research
topic.

So that seems to leave me choosing between a type-inferenced functional
language, a type-annotated traditional language, or a dynamically-typed
language.  Right now it seems like that last group is the one that fits my
preferences the best.

Or maybe the answer is a new language, something that has the same
relationship to OCaml that Ruby has to Perl (i.e. OO from the ground up).

PS I've been reading about monads, and I must say that theoretically,
they are startingly beautiful, but from a programmer's standpoint, they
still frighten the bejeezus out of me.  Of course, so do C++ templates.
--
	Steven
"Don't kid yourself, Jimmy.  If a cow ever got the chance
he'd eat you and everyone you care about!"