Re: Prothon IS different inside
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <033801c4671c$f7985f80$0d01a8c0@MarkVaio> |
Joe Mason wrote: >> Maybe it is possible to ignore Parrots built-in types, which are for >> Perl, and just use the objects. That must be the plan for Python. >> The int, float, and string are there for future optimizations, if >> desired. > > 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? You just wouldn't map them to real Prothon > types like you would with objects. Yes, I would be forced to use the Java type model of non-objects and objects. I would have to emulate my flexible objects by pairing objects and non-objects. This would make putting attributes on integers and other normally orthogonal things a bit of a pain. In other words every time I load an Int object into an Object register I would have to load a real int register also. In Prothon my object structure just has one bit of overhead to keep track of whether an Int needs attributes. In Parrot, I wouldn't have that bit in a normal int, so I would have to drag around an entire object with the int in order to maintain the same flexibility. I guess I need to learn more about how flexible their objects are before I bitch too much more. It will be interesting to see how the Parrot/Python speed competition goes in a few weeks. That will make a difference to my interest level.