On Tue, 1 Aug 2000, Tony Payne wrote:

> > No, I disagree.  Perl gains a lot of its expressive power from being lax
> > about typing.  I suspect it will also impose an unacceptable overhed for
> > the vast majority who don't want it - at the very least every variable
> > access will have to check an 'are you typed' flag.
> 
> I agree that weak typing is a huge advantage for Perl -- if the task is
> small.  However, for a large project with more than 2 engineers, strong
> typing can save weeks of integration effort.  In a typical large project,
> the first step is to define APIs, then split off and begin coding against
> those APIs.  The problem with using Perl for a project of this size is that
> when it's time to integrate, there's no compile-time way to check that the
> inputs and outputs of the APIs are correctly typed.  This is a very small
> piece in a complex puzzle, but incredibly useful for this purpose.  And I
> don't buy the argument that I should use a different language just because
> it's a large task.

Isn't this almost a case for revamping the prototyping system? You can
define your API in terms the current perl variables (nothing in the above
suggests that integers versus floats is the main problem) and have a
prototype system that actually allows you to specify that "argument 3
should be an array with 5 entries", "argument 2 must be a hash reference"
(allowing you to pass in a scalar containing a hash ref as well as a
hash). Would that cover what you want?

-- 
Tim Jenness
JCMT software engineer/Support scientist
http://www.jach.hawaii.edu/~timj


Reply via email to