Re: Prothon IS different inside

Paul Prescod <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
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.

  Paul Prescod
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.