im beginning... asm

Started by
9 comments, last by Matt_D 15 years ago
Quote:Original post by owiley
from most the scripting language out there they all seem to take the from of c not c++ so i started think about how c++ classes was implemented in asm. I which know a small amount started to look around for writing of asm classes. then i came across asm and oop which lead me to my anwser which is just to feed my George.

and nope im not doing compiled scripts was just curious about how it was done. Im doing semi-compiled


seriously, if your thinking of writing a c/c++ like scripting language, dont, just use c/c++, it already has good debuggers, compilers, profilers, dont re-invent the wheel man!

do you really need inheritance in your scripting language? if you think you do, perhaps you need to reconsider what your trying to script? keep it simple, keep it light, keep it fast. if you need complex functionality, perhaps you should write it in an actual language which has all the aforementioned support.

this is a pre-emptive rant :) ive seen people abuse the crap out scripting languages, infact, ive seen it happen so much that i have an 'infinite complexity' theorem. that any code written in any scripting language, will over time trend to infinite complexity :) theres a point that gets crossed pretty quickly at which it wouldve been easier (faster, smaller, more maintainable) to have just written it in an actual language instead.

my 2c

as far as vtables go, have a read of the intel x64 ABI (http://refspecs.freestandards.org/elf/IA64-SysV-psABI.pdf) for the details on how the compiler implements vtables. single inheritance is pretty straightforward, multiple inheritance gets interesting .

from a runtime point of view, the compiler has already generated the vtable information for you during the compile stage, you just need to provide a pointer to the correct vtable (this is inserted during construction by the compiler). again, simple for single inheritance, multiple inheritance is complex . read the ABI if your interested (gcc and vc both use that ABI spec).

good luck :)
your never as good as they say you were, never as bad as they say you was.

This topic is closed to new replies.

Advertisement