develooper Front page | perl.perl6.language | Postings from May 2008

Re: First look: Advanced Polymorphism whitepaper

Thread Previous | Thread Next
From:
TSa
Date:
May 2, 2008 05:39
Subject:
Re: First look: Advanced Polymorphism whitepaper
Message ID:
481B0B5A.3060200@barco.com
HaloO,

Ovid wrote:
> 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

Then, since classes are open, the programmer can easily say

   CGI does CGI::Simple;

and let go CGI instances wherever a CGI::Simple is expected.
As added value you can get a compiler check with

   CGI does:strict CGI::Simple;


Regards, TSa.
-- 

"The unavoidable price of reliability is simplicity"  -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it."  -- Alan Jay 
Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About