On Tuesday, November 26, 2002, at 09:47  AM, Larry Wall wrote:
: > (3) Context. How to determine it, how to force it. Hypothesis: There
: > is a one-to-one relationship between Type and Context, such that there
: > is a context that matches every type, and a type that matches every
: > context (except void).

Well, it is a good question. We don't have a type for every context in
Perl 5, particularly for boolean and list context. They just get mapped
onto existing scalar and array types.
My own supposition is that it's useful to think of context and type as two sides of the same coin. Context is just the Type you're expecting. (Sounds like a bad country song.)

Aside from C<void>, is there a reason for that _not_ to be the case?

: > (4) Typecasting. How int <--> num, num <--> str, str <--> bool, etc.
: > Generic typecasting rules: how to define user classes that can typecast
: > to/from str, int, bool, etc. This gets into Perl6 OO, but we may need
: > to request some preliminary decisions before then, because the
: > implications are substantial.

What we're really talking about is coercions or conversions.
Yes, sorry. I need to break myself of that word. "Coercions" be what I mean.

MikeL



Reply via email to