octave-maintainers
[Top][All Lists]
Advanced

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

Re: usejava.m


From: Rik
Subject: Re: usejava.m
Date: Mon, 06 Feb 2012 07:45:09 -0800

On 02/04/2012 08:54 AM, address@hidden wrote:

> Date: Fri, 3 Feb 2012 15:29:06 -0800 (PST)
> From: PhilipNienhuis <address@hidden>
> To: address@hidden
> Subject: usejava function
> Message-ID: <address@hidden>


2/6/12

Philip,

I added the function usejava().  It is entirely a stub and returns false since core Octave does not support Java.  It was mainly a gesture towards compatibility.  My guess is that most Matlab programs either use Java features or don't use Java features, but probably very few of them have coded up tests to check with usejava() and then implement an alternative.

If you want to improve the function please go ahead.  I think either approach you outlined is fine.  I had been assuming something like your second approach which is a C++/inheritance way of thinking.  In this way of thinking, the core defines a function but the behavior can be overloaded or modified by a subclass.  In this case, core Octave does not support Java but if someone has installed a package, like the Octave-Forge one, that did add support for some functionality then it could overload usejava and tell users which features it supported.

I do know how freaked people get when they see a warning message so if you want to adopt approach #1 that is also good.

--Rik


reply via email to

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