--- "John M. Dlugosz" <[EMAIL PROTECTED]> wrote:

> chromatic chromatic-at-wgz.org |Perl 6| wrote:
> > This is why roles-as-types is so important: type inferencers can't
> infer 
> > allomorphism because allomorphism relies on explicitly-marked
> semantic 
> > meanings.
> >   
> 
> What is your nomenclature here?  "vary in sound without changing its 
> meaning"? What are marked semantic meanings?

I was curious about this myself.  I always thought of allomorphism as
being classes unrelated by inheritance still presenting the same set or
subset of behavior.  However, chromatic is attaching semantics (correct
me if I'm misunderstanding), something I wasn't aware of as a
requirement, but in retrospect, it makes sense.  So if a class does a
particular role, by relying on those methods, you get the semantic
meaning (the role) attached to them and that's what we're looking for.

However, the CGI/CGI::Simple example I posted earlier doesn't fulfill
this.  CGI::Simple offers a subset of CGI.pm's functionality and it's
guaranteed to be identical (it doesn't have HTML generation
functionality and the procedural/OO interfaces are clearly split).  I
can usually use the latter in place of the former, but since semantic
meaning isn't attached, restricting me to roles doesn't work. 
Requiring others to use roles in this case is also too restrictive.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/

Reply via email to