OO Language

Page 1/5
| 2 | 3 | 4 | 5

By slowerisbetter

Master (194)

slowerisbetter's picture

18-11-2011, 18:40

I found some thread from 2003 about programming languages on MSX here. I was wondering if anyone managed to make a usable OO MSX language. And by usable I mean that if you compile => run a program in it, your computer doesn't grind to a halt Smile

Login or register to post comments

By Manuel

Ascended (19688)

Manuel's picture

18-11-2011, 18:41

I'm still hoping someone will make an OO language cross compiler...

By TheWhipMaster

Expert (120)

TheWhipMaster's picture

19-11-2011, 18:12

That's a great idear , a cross compiler C++ or Java would help me so much to become a msx developer LOL!

By PingPong

Enlighted (4156)

PingPong's picture

19-11-2011, 18:23

not so useful.
the complexity of OO approach and size of executable will limit your program to something like class HelloWorld {} ;-(

By TheWhipMaster

Expert (120)

TheWhipMaster's picture

19-11-2011, 20:46

Well having a nice abstraction layer that will present every function and extension (fmpac,msx audio...) like JNI could be useful !
So assembling function will be like assembling lego Tongue

By Manuel

Ascended (19688)

Manuel's picture

19-11-2011, 22:32

PingPong: the language doesn't determine the code size...

By retrocanada76

Hero (575)

retrocanada76's picture

19-11-2011, 22:39

well a C++ would be slow. C is already slow on MSX. If you take the SDCC all local variables inside a function are done using IX+n indexing.

C++ classes are structs so you have more IX+n indexing all over your code. Not to mention vtables. Also expect several limitations in class sizes, etc.

Such implementation is doable but not very useful imo

By bore

Master (182)

bore's picture

20-11-2011, 00:36

Assembler is an object oriented language if you want it to be.
I don't really see any benefit to languages that _force_ you to use the OO paradigm. You can structure you program in an object oriented manner in pretty much any language and sometimes it even comes out nicer looking than it does in semi-pure object oriented languages.

By PingPong

Enlighted (4156)

PingPong's picture

20-11-2011, 12:15

PingPong: the language doesn't determine the code size...
No?
for example, take a look at the code generated to do a vtable virtual method dispatch on moderns processors, compared with a early one....
And please consider that today processors are more 'C' friendly than a z80, and have instructions to help vtable dispatch.

By Manuel

Ascended (19688)

Manuel's picture

20-11-2011, 12:56

The language doesn't make it slow, I think that's up to the compiler.

I like a language to support my programming (i.e. the way I model the stuff), instead of one that frustrates me and stops my train of thoughts.

That's why I said I'd like to have a language targeting MSX that has this kind of service. OO helps a lot for this, at least to me.

By TheWhipMaster

Expert (120)

TheWhipMaster's picture

20-11-2011, 13:21

PingPong: the language doesn't determine the code size...
No?
for example, take a look at the code generated to do a vtable virtual method dispatch on moderns processors, compared with a early one....
And please consider that today processors are more 'C' friendly than a z80, and have instructions to help vtable dispatch.


Well i look at arduino oo like programming and the code isn t that big , concerning code generator if you look at tool such as miagenerator you can define the template , so if the template are well optimize the result isn t so bad ...

Page 1/5
| 2 | 3 | 4 | 5