Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml related article
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-23 (08:12)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] OCaml related article
> 	His conclusion though is that it is practically impossible
> 	to introduce any kind of static typing to Perl.

Dominus' claim is that if it could be done, it would still be largely
useless: since Perl has so many context-dependent automatic coercions,
nearly all programs would be correct, and the type system wouldn't
help much finding programming errors.

Actually, I believe one could do a soft typing system for Perl along
the lines of Mr. Spidey for Scheme
(, using
constraint-based flow analysis.  Of course, uses of "eval" would not
be checked at all.  But Dominus' point that it would be largely
useless is probably true.

>       Contrast it
> 	with
> 	where Lex Spoon attempts to deliver a type inference engine to
> 	Smalltalk (sic!).

Why not?  Constraint-based flow analysis can be applied to Smalltalk
(at least without the reflection features -- if you change the
behavior of method invocation, all bets are off), and since Smalltalk
has cleaner, more restrictive dynamic semantics than Perl, it could
actually be useful in finding errors.

- Xavier Leroy
To unsubscribe, mail  Archives: