octave-maintainers
[Top][All Lists]
Advanced

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

Re: Matlab has implemented flip after only 10 years - deprecate flipdim


From: Carnë Draug
Subject: Re: Matlab has implemented flip after only 10 years - deprecate flipdim
Date: Tue, 23 Sep 2014 20:56:24 +0100

On 23 September 2014 17:56, Rik <address@hidden> wrote:
> On 09/23/2014 04:16 AM, address@hidden wrote:
>> Hi
>>
>> during the codesprint this weekend (before I figured that the subject
>> was going to increase line coverage), I added a new function, flip,
>> and deprecated flipdim [1]. The function flip is exactly the same as
>> flipdim, the only difference being that the first exists in Matlab
>> (since R2014a - only 10 years after Octave).
>
> Another way to look at it is that Octave is a superset of Matlab.  As long
> as flip is added, so that users can run their Matlab scripts in Octave, we
> don't necessarily have to get rid of flipdim.  I actually like the name
> flipdim because it is more meaningful to me than just flip.  Within Octave
> we occasionally do this where we have aliases for the same function.  There
> is 'lgamma', the C library conventional name, and 'gammaln', the Matlab
> name.  Both co-exist peacefully.  Similarly, there is 'isbool' and
> 'islogical'.  Maybe you want tao undeprecate flipdim and make one function
> an alias of the other.

I agree with the superset of Matlab syntax but not always. I believe that
Matlab's default namespace (and by extension, also Octave's) is over poluted
so having function alias (and flip would be a flipdim alias in this situation),
should be a careful decision. It makes sense for the examples you gave where
the other name is common in other places, but for flipdim I don't see why.

I also think that the name flipdim() makes more sense but we are biased
because we've used it before and because we might also be thinking of
rotdim (I wonder how much longer it will take for Mathworks to implement it).


On 23 September 2014 12:14, Mike Miller <address@hidden> wrote:
> I don't see a problem with what you've done. It's the same path we've
> followed before for deprecating functions, right? I don't think somehow
> "silently" deprecating it would have any effect, people will probably
> continue to use flipdim until the warning actually appears.
>
> If package maintainers want to continue to support multiple Octave
> versions, they can locally disable the warning wherever flipdim is used
> until they decide to switch to flip and depend on Octave >= 4.2.

Usually there's a time when both functions co-exist peacefully which allows
for package maintainers to move on easily (I guess with the "local" option
to disable warnings this will be easier).  Oh well, let's let it go and see
what happens.

Carnë



reply via email to

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