I have been away for ten days. I blame the first two days to the overly addictive The Sims engine; however, thanks to previous inoculation from NetHack, I eventually got out of it.
During the week that followed, my time was divided evenly between new $work, and ingesting thousands of pages of papers in the hope of coming up with a sane PIL design.
To that end, in addition to formal systems such as F<:, CoC (also Fw etc -- see an explanation in CubInt), vObj (including their very convincing solution to the expression problem ) and various module systems, I also surveyed the internal calculi of two classes of languages:
- Typeful static languages with first-class functions and objects
- O'Caml, Nice, Scala, rHaskell, Nemerle, Boo
- Dynamic languages with reconstructable types
- Cecil, CMUCL/SBCL, PyPy/Starkiller, Scheme (Widera), Chuck/Squeak (Garau)
However, that relies on Perl 6 observing a sound type system in its type annotations; see this post and two self-replies after it for a brief overview of the problem. I don't know if @Larry or p6l have discussed this before; to me, this issue decides whether PIL can use user's type annotations toward static typechecks.
Perl 6 has named, multi-parameter generics, known as hierarchical types, which brings with it the variance problem. Currently, there is no syntax in Perl 6 for variance annotation; I propose that we adopt variance inference in the style of O'Haskell, possibly overridable with definition-site annotations in the style of Scala.
As I was often reading those papers and experimenting PIL designs during work breaks, my work with current Perl 5 technologies (Catalyst, Test::Base, DBD::SQLite, PDF::API2) kept me firmly grounded. While Perl 6's better is better mentality makes hard things easier, we must not at any time make easy things harder.