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

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

Thread Previous
From:
Linda W
Date:
August 12, 2012 16:54
Subject:
Re: [perl #114460] RFE: class as conditional self-defining keyword for package
Message ID:
50284232.2050104@tlinx.org
Jesse Luehrs via RT 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).---
>   
    I don't see this as bad or necessarily conflicting.

    I don't need to RESERVE the keyword -- just use it.

    If you want add to it to make them 'more classy', I wouldn't have
a problem.  But...you didn't even introduce given/when unless the user
uses "5.10.0" or the specific keyword, how likely is it that the new keyword
will just be dumped into the namespace and cause conflicts?

    Isn't it likely to have, some 'base' of similar semantics (though if you
have it forcing file includes, I'll be cross!).  But what other things?
method as a synonym for  'sub ...
                            my $this=shift;'
or what?  how would the syntax vary?  from "class Class::Name;"  or 
would it?

I.e. -- This could easily be an early start...  with the proviso that
in future versions, exact syntax and semantics may change -- as long as
it doesn't force file access... I'm pretty copacetic with such... but I 
would
ask that you support inclusion of the described level of support while you
until you get to your medium-term time-frame, as it doesn't sound like it
it's going to happen soon (?)...of course if medium term = next major 
(next summer?) then it may be of no consequence / issue anyway...
(i.e. well, get to it, and I wouldn't have to deal with trying to push
partial semantics through now, as it very easily/conceivably could 
solve/address
the issue raised ).










Thread Previous


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