On Thu, Jun 30, 2005 at 06:17:14AM -0000, David Formosa (aka ? the Platypus) 
wrote:
> On Thu, 30 Jun 2005 05:17:56 +0300, Yuval Kogman
> <[EMAIL PROTECTED]> wrote: 
> [...]
> 
> > I gave Perl 6 to Mr. Clean, and he said that if type inferrence was
> > formalized, and used always, except that it's usually used for
> > performance, and with a lexical pragma can be used to enforce types.
> > I like facist programming when it can help me, so I would like to
> > see something like his proposal.
> > 
> >     no autocoerce;;
> >     my $y =3D 'blah';
> >     my Int $x =3D $y; # compile time type error
> > 
> > This scheme is not perfect.. Maybe someone has an idea?
> 
> I would prefur this to be written.
> 
> use strict "types";
> 

I suspect there will be many ways to do types stricture/inference in
Perl6.  I expect that type modules will influence PIL generation so
that people will have to choose the structures they want at a given
place:

  use Types::some-type-sheme

or even

  use Types::Functional::some-sub-type-sheme

If such a typing mode gives us an haskell with some Perl6  concrete syntax
we eventually could port the whole Haskell environment as Perl6.
docs/notes/recursive_polymorphism_and_type_inference is a start in
that direction.

The best we can hope is that PIL generarion will eventually be written
in Perl6. I hope Perl6 will eventually become more expressive than Haskell for
handling type problems.  So Perl6 could become the playground of type
theory searchers.

I have a dream...  At any given place, be able to choose between the
power of functional programming or the convenience of imperative
programming. both  while keeping Perl6 nice syntax.

-- 
  cognominal stef

Reply via email to