[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'fstat' compatibility issue
From: |
Michael D. Godfrey |
Subject: |
Re: 'fstat' compatibility issue |
Date: |
Wed, 17 Feb 2010 19:00:21 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 |
On 2/17/10 3:10 PM, John W. Eaton wrote:
> On 17-Feb-2010, S ren Hauberg wrote:
>
> | It was mentioned on the Octave-Forge list that the 'statistics' package
> | has a function called 'fstat' that clashes with the function of the same
> | name in Octave. This is bad.
> |
> | Matlab has a function called 'fstat' that does the same as the function
> | in the 'statistics' package. For compatibility, I think we should rename
> | the 'fstat' function in core Octave into something else. This will,
> | however, break applications that use the 'fstat' function from core
> | Octave.
> |
> | Any thoughts on how to deal with this issue?
>
> If we had namespaces, I'd be willing to move all the OS-related
> functions into something like os.FCN or posix.FCN or similar.
>
> jwe
>
One approach for this specific case is to use the fact that
the Octave fstat requires one argument (a FID). The matlab fstat
and, I assume, the Octave-forge one require 2 arguments (V1,V2).
So, the Octave fstat could be modified so that if it gets one
argument it acts as now, but with a warning that it has been replaced
by ???. If it gets 2 arguments it does the Octave-forge stats function.
This would minimize the problems for "legacy" Octave code. Also, I
am not sure that namespaces, though very nice, would provide a
similar fix what would not require some change to legacy code.
Michael