Nikolay Pavlov wrote:

> I am also wondering why evalcmd()? When discussing the name in Neovim
> bug tracker I was against `evalcmd()` because for `eval('expr')`
> expression result is expected to be the only effect (though it is not
> necessary, most expressions used with `eval()` do not have
> side-effects). Commands on the other side do not have any results of
> evaluation at all, they are run for their side-effects and `capture()`
> just records one of their side-effects, so `eval…` is not a good name.
> Note that this function is not going to be used only for capturing
> output, in some cases it will be just a replacement for `:execute`
> which works in expression context.

Yeah, I'm also not happy with evalcmd().  It seemed right at first, but
comparing to eval() it's quite different.

I also don't like capture(), since it's actually executing the commands.

It's actually more like system(), which already was a weird name from
old days.

Perhaps we should call it execute() ?
It's executing commands and returning the output seems like an obvious
thing for such a function to return.

We might want to make the ":silent" part optional then.

-- 
hundred-and-one symptoms of being an internet addict:
233. You start dreaming about web pages...in html.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui