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

Re: Objects without stashes?

Thread Previous | Thread Next
From:
Reini Urban
Date:
July 10, 2012 08:03
Subject:
Re: Objects without stashes?
Message ID:
CAHiT=DEdXUrq44hNQENC=AbSU-kZyja60=1OzFVtMg5NacdRFA@mail.gmail.com
On Sun, Jul 8, 2012 at 11:35 AM, Jesse Luehrs <doy@tozt.net> wrote:
> On Sun, Jul 08, 2012 at 10:17:31AM -0500, Reini Urban wrote:
>> On Fri, Jul 6, 2012 at 11:34 AM, Leon Timmermans <fawaka@gmail.com> wrote:
>> > On Fri, May 25, 2012 at 8:47 PM, Reini Urban <rurban@x-ray.at> wrote:
>> >> Simplier? A MOP will always be more complicated and slower.
>> >> Our approach is always more general than the tighter OO systems in
>> >> other languages you are thinking of.
>> >
>> > I don't think a MOP has to be slower, in fact I can imagine it being
>> > faster than what we're using now. Currently we have to deal with lot
>> > of the overhead due to the mismatch between the kind of semantics
>> > people want (powerful stuff like a mop) and the building blocks we
>> > have available to build that (stashes/globs/packages).
>>
>> Nonsense.
>> It is slow because it cannot be optimized at compile-time.
>> stashes, globs and packages are perfectly fine. The problem
>> is our lack of constness or more compile-time knowledge/attributes.
>>
>> A MOP is by definition slower. It is a HUGE overhead.
>> Please do some basic readings what a MOP is.
>> It can be made faster when the general perl syntax (independent of a MOP)
>> will allow compile-time optimizations.
>> Changing over to new keywords will allow this easily.
>
> There is nothing about a MOP that prevents compile-time optimizations.

yes.

> A MOP that doesn't allow for compile-time optimizations would be a pretty
> poorly designed one.

Yes. But I miss it in your prototype.
In comparison Damiens perl5i prototype includes it in the design already.
http://web.archive.org/web/20040224135403/http://www.yetanother.org/damian/Perl5+i/class.html

> There is nothing about a MOP that requires it to be "by definition" slower.

Sorry, it *IS* by definition bigger and slower.
Only in our case perl5 this might be not true because our current design
is so poor/halfbaked, that the addition of a MOP might actually improve
performance and expressibility.
-- 
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/

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