Re: Prothon IS different inside

Joe Mason <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
On Sun, Jul 11, 2004 at 08:40:51AM -0700, Paul Prescod wrote:
> Joe Mason wrote:
> 
> >...
> >Well, you have to use them when writing the object internals.
> >Otherwise, what actual Parrot asembly instructions do you emit while
> >adding two int objects?  
> 
> The instructions to call add_ methods on the objects. And then the 
> objects are implemented in C so they do addition C-style. That's more or 
> less how Python does it although there is an optimization for if the 
> interpreter detects that both operands are really just integers: then it 
> skips the method call and does the addition itself.

Objects are implemented in C?  Man, suddenly the porting effort (of
Parrot to a new platform) doubles...

Joe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.