octave-maintainers
[Top][All Lists]
Advanced

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

Re: 'fstat' compatibility issue


From: Jaroslav Hajek
Subject: Re: 'fstat' compatibility issue
Date: Thu, 18 Feb 2010 09:17:23 +0100

2010/2/18 Michael D. Godfrey <address@hidden>:
> 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
>

In this particular case I think on Octave's part we can simply
obsolete fstat and let the functionality be handled by "stat"
directly.
See the attached patch.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Attachment: fstat.diff
Description: Text Data


reply via email to

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