Over the years many functions have been added, implemented by various
people.  The documentation has become a bit inconsistent.  I have now
gone through them to figure out the return type of each function, and
had to resort looking at the code to make sure what it was.

Sometimes the words "The result is" are used, sometimes "Returns" in
several places.  Sometimes nothing, and it's not clear if the function
returns nothing or that it was forgotten to document.

How about a very clear marker RETURNS with a descriptive text?
And when the function doesn't return anything: "RETURNS nothing".

For example, getpos() currently has:

                The result is a |List| with four numbers:
                    [bufnum, lnum, col, off]

That would be:
                RETURNS a |List| with four numbers:
                    [bufnum, lnum, col, off]

The position of the RETURNS line depends on how important the value is.
For getpos() it is clearly the main purpose of the function, so it
should be near the top.  For other functions it indicates an error and
it can go near the end.

-- 
User:       I'm having problems with my text editor.
Help desk:  Which editor are you using?
User:       I don't know, but it's version VI (pronounced: 6).
Help desk:  Oh, then you should upgrade to version VIM (pronounced: 994).

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202001041412.004ECWWD009824%40masaka.moolenaar.net.

Raspunde prin e-mail lui