Re: info about OOP interpreter design and functions management?

vbdis@aol.com (VBDis)
20 Aug 2003 01:29:52 -0400

          From comp.compilers

Related articles
info about OOP interpreter design and functions management? mrfaro@libero.it (Gabriele Farina) (2003-08-10)
Re: info about OOP interpreter design and functions management? isaac@latveria.castledoom.org (Isaac) (2003-08-15)
Re: info about OOP interpreter design and functions management? vbdis@aol.com (2003-08-20)
Re: info about OOP interpreter design and functions management? kamalp@acm.org (2003-09-01)
Re: info about OOP interpreter design and functions management? mrfaro@libero.it (Gabriele Farina) (2003-09-04)
| List of all articles for this month |
From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 20 Aug 2003 01:29:52 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 03-08-026
Keywords: OOP
Posted-Date: 20 Aug 2003 01:29:52 EDT

"Gabriele Farina" <mrfaro@libero.it> schreibt:


>I'd like to know how I can manage class declarations and initialization.


Perhaps a look back at the start of C++ will help. Classes can be
treated like other data structures (struct, record...), so it's
sufficient that your interpreter can handle structured data types. At
least you'll find more about the handling of structured data types in
interpreters, than about the handling of full blown objects and
classes.


>I got also problems with functions: can someone easilly talk to me how
>functions declarations and calling can be managed?


Methods are functions in disguise, which take their object as a hidden
argument. A statement like:
    obj.meth(arg)
then can be implemented like a more traditional procedure call:
    meth(obj, arg)


Things become more complicated when you want to implement polymorphism,
inheritance and virtual methods.


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.