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