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

Re: Objects without stashes?

Thread Previous | Thread Next
Reini Urban
July 8, 2012 08:17
Re: Objects without stashes?
Message ID:
On Fri, Jul 6, 2012 at 11:34 AM, Leon Timmermans <> wrote:
> On Fri, May 25, 2012 at 8:47 PM, Reini Urban <> 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).

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.
Reini Urban

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