octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespace resolution in libinterp


From: Carnë Draug
Subject: Re: Namespace resolution in libinterp
Date: Mon, 9 Jul 2018 13:12:14 +0100

On 7 July 2018 at 09:35, Andrew Janke <address@hidden> wrote:
> Hi, Octave maintainers,
>
> I'm interested in writing a patch for Octave to support Java-style syntax
> for invocation of Java constructors and static methods, so you can write,
> for example:
>
>     jstr = java.lang.String('foo');
>     prop = java.lang.System.getProperty('foo');
>
> instead of:
>
>     jstr = javaObject('java.lang.String', 'foo');
>     prop = javaMethod('getProperty', 'java.lang.System', 'foo');
>
> This would make Java objects more usable, and increase compatibility with
> Matlab.
>
> Can someone point me to the place in the Octave code (probably in
> libinterp?) where it handles namespace resolution, so I can use that as a
> starting point?
>
> Cheers,
> Andrew

Hi Andrew

I think Matlab already has support for something similar so if you do
it, can you do it a Matlab compatible way?

Also, Octave should be doing automatic wrapping and unwrapping of
selected types.  One of them is char arrays <-> java strings, so you
should not need to explicitely do javaObject to get a java string that
can then be used in other functions.

Carnë



reply via email to

[Prev in Thread] Current Thread [Next in Thread]