Re: where constraints as roles (was Re: how typish are roles)

2006-10-30 Thread Jonathan Lang
TSa wrote: IOW, I fear this could only be put to work with two subset declarations subset ab of Str where /^a.*b$/; subset aabb of ab where /^aa.*bb$/; and the notion that the second subset by virtue of constraining the possible values further produces a more specific subtype for dispatch

Re: where constraints as roles (was Re: how typish are roles)

2006-10-30 Thread TSa
HaloO, Jonathan Lang wrote: At its core, a type is nothing more than a constraint on the objects that a given variable is allowed to handle; this would put C clauses at the center of the type system, with roles coming in a very close second due to the implicit use of ".does()" in the compact syn

Re: where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread chromatic
On Saturday 28 October 2006 09:15, Larry Wall wrote: > My initial inclination is to say that "where" clauses in a signature > are only there for pattern matching, and do not modify the official > type of the parameter within the function body.  However, on a "subset" > the "where" clause is there

Re: where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread Jonathan Lang
Trey Harris wrote: Trey Harris writes: > chromatic writes: >> When you specify a type to constrain some operation, you specify that the >> target entity must perform that role. > > That statement is very concise and direct. If the fuzziness I observed about > the identity of the basic building bl

Re: where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread Larry Wall
My initial inclination is to say that "where" clauses in a signature are only there for pattern matching, and do not modify the official type of the parameter within the function body. However, on a "subset" the "where" clause is there precisely to contribute to the typing, so if you want the extr

where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread Trey Harris
In a message dated Sat, 28 Oct 2006, Trey Harris writes: In a message dated Sat, 28 Oct 2006, chromatic writes: When you specify a type to constrain some operation, you specify that the target entity must perform that role. That statement is very concise and direct. If the fuzziness I observe