develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #114460] RFE: class as conditional self-defining keyword for package

Thread Next
James E Keenan via RT
September 18, 2012 18:54
[perl #114460] RFE: class as conditional self-defining keyword for package
Message ID:
On Mon Aug 13 18:38:41 2012, wrote:
> On Sun, Aug 12, 2012 at 6:04 PM, Jesse Luehrs <> wrote:
> > On Sun, Aug 12, 2012 at 03:58:14PM -0700, Linda W wrote:
> >> The problem is that "Core" doesn't have pure classes -- it has
> modules, yet
> >> it represents itself as an OO language.  The modules have
> requirements that
> >> classes don't -- inherently, tying 'concept' to implementation is
> an
> >> anathema
> >> to OO design.   Adding a package to CPAN won't change the problem
> in Core.
> >
> > One of our medium-term goals for the language in the next couple of
> > years is to add the concept of real, actual classes to the perl
> core.
> > I'd be against adding this idea to core if only because of namespace
> > clashing issues (a real class implementation will also want to be
> able
> > to use the 'class' keyword).
> >
> > -doy
> I happen to agree with Jesse on this point: at the very least, don't
> use the reserved word "class".
> In general, though, is your point of contention not solved by a well
> written SYNOPSIS section in the module's documentation? Unlike other
> languages, Perl makes documentation writing very simple, and a well
> written SYNOPSIS should make it very clear what needs to be "use"d in
> order to get the class properly pulled in.
> David

This RT generated considerable discussion but, AFAICT, no actionable
patches.  I recommend that we close this ticket and have interested
parties open a new RT when they're ready to submit a patch.

I will close this ticket in seven days unless there is strong objection.

Thank you very much.
Jim Keenan

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About