OO Language

Pagina 1/5
| 2 | 3 | 4 | 5

Door slowerisbetter

Master (194)

afbeelding van slowerisbetter

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

Aangemeld of registreer om reacties te plaatsen

Van Manuel

Ascended (19469)

afbeelding van Manuel

18-11-2011, 18:41

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

Van TheWhipMaster

Expert (120)

afbeelding van TheWhipMaster

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!

Van PingPong

Enlighted (4140)

afbeelding van PingPong

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 {} ;-(

Van TheWhipMaster

Expert (120)

afbeelding van TheWhipMaster

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

Van Manuel

Ascended (19469)

afbeelding van Manuel

19-11-2011, 22:32

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

Van retrocanada76

Hero (559)

afbeelding van retrocanada76

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

Van bore

Master (169)

afbeelding van bore

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.

Van PingPong

Enlighted (4140)

afbeelding van PingPong

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.

Van Manuel

Ascended (19469)

afbeelding van Manuel

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.

Van TheWhipMaster

Expert (120)

afbeelding van TheWhipMaster

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

Pagina 1/5
| 2 | 3 | 4 | 5