Re: Learning the Octave interpreter code to implement Java class dot-referencing

Hossein Sajjadi <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <CAEuvCVNrdgD=ozinwksf4dtxuPDmd0XX90AF4tUeewm1k+qs=g@mail.gmail.com>
On 7/11/20, Mike Miller <[email protected]> wrote:
> Hi Hossein,
>
> On Sat, Jul 11, 2020 at 18:31:38 +0430, Hossein Sajjadi wrote:
>> Backed by developing Octave Coder here are my insights  when trying to
>> create an external language interface for python and before placing it
>> in my TODO queue (The same concepts here are applied to java):
>
> Are you aware of the Python language interface I've been developing for
> several years now? Care to help improve it instead of creating a new
> one?
>
>   https://wiki.octave.org/Pythonic
>   https://gitlab.com/mtmiller/octave-pythonic
>
> Thanks,
>
> --
> mike
>

Hi Mike!
Interesting! If I correctly understand, In Pythonic a class is defined
in Octave named 'py' and subsref is overloaded to enable dot ref
indexing. The result of indexing operation will be a dot separated
string  plus the argument list.The argument list is converted to
python objects and the proper python function  is searched and
executed.

One may follow the same approach to implement dot referencing for java
with the benefit that he has a working project at hand to follow. But
if they want to follow the method that I pointed out they need to do a
different work. But java.__ here will be treated as package
(namespace) and the idea can be extended so that one can subclass a
java class in Octave and send its instance objects to java.

Honestly my TODO for python is just restricted to an idea. Currently I
focused on Coder and some other things.
-- 

Sincerely,
Hossein
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.