octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #46856] Add 'stable' flag for `unique` and rel


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #46856] Add 'stable' flag for `unique` and related fiunctions?
Date: Thu, 11 Feb 2016 13:20:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #10, bug #46856 (project octave):

Thanks, Luis.  These look like great progress.

Some quick comments about formatting:
- Octave's style is to use "endif", "endfunction" etc. instead of just "end".
- Octave's style is not to have multiple statements on one line.  Every ";",
"if", "end..." etc should be on its own line.
- Indentation is by two spaces, not four.
- The bracket of a function call has a space before it.
- "!" is used for not instead of "~".
- The entire body of the function is indented.
- The conditions of "if", "while" etc. have brackets around them.

Many of the guidelines are state at


https://www.gnu.org/software/octave/doc/interpreter/Octave-Sources-_0028m_002dfiles_0029.html#Octave-Sources-_0028m_002dfiles_0029


When I first started submitting patches, I found the emphasis on formatting
frustrating, but I can now see how much easier it is to read code when it is
uniform.

I don't think you need to use varargin.  You can just specify the names of the
variables (A, B, str1, str2), and if it is called with fewer variables, then
the later ones just have an undefined value.  That will make the code easier
to read.

The code seems to provide all of the outputs provided "stable" isn't
specified, so no functionality is lost.  That is good.

Leaving the C++ to do the hard work is also sensible; we can just rename the
built-in so that we don't have these wrappers sharing the same names.

Matlab has introduced 'legacy', in addition to 'stable'.  The main difference
seems to be in the second output, so it doesn't affect us yet, but we may want
to handle that before the patches get applied.

Thanks for your contribution.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46856>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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