I want to learn a new language...
jonathan at carnageblender.com
Thu Feb 15 11:02:13 MST 2007
On Thu, 15 Feb 2007 10:48:55 -0700, "Bryan Sant" <bryan.sant at gmail.com>
> On 2/14/07, Hans Fugal <hans at fugal.net> wrote:
> > I disagree that duck typing (which is a feature of ruby also) is a
> > problem. I find it much more useful than not. I do agree however that it
> > is important to document what is accepted and expected for your methods.
> Doesn't this defacto need to document your parameters bring back much
> of the verbosity of a statically typed language? I'm not trying to be
> inflammatory, it's a sincere question I've had for a long time. I've
> avoided using dynamic languages partly for this reason.
Not really. First, because such "type information" is often encoded in
the parameter name itself -- "count" is (or should) always be an int,
and I don't need a type declaration to tell me that. And then you have
doctest (http://www.python.org/doc/lib/module-doctest.html) which is the
best thing since sliced bread. (Really!)
But more importantly, leaving out type declarations is only a small part
of what makes dynamic languages so productive:
More information about the PLUG