LCD 47 wrote:
On 19 March 2014, Cade Forester <ahx2...@gmail.com> wrote:
Looks like you made a copy of f_sort() and modified it a bit.  That's a

lot of duplicate code.  Better move the common stuff into a function

that's used by both sort() and sortuniq().
Fixed
     How about separating it from sort()?  That is, an uniq() function
that would remove duplicates from an already sorted list (results would
be undefined if the input list is not sorted).  That would be consistent
with how uniq(1) works on UNIX.

I'm not convinced that it should even be in the vim source. (ducking spitballs now) The only reason I see for it is to support Windows, as it is command-line tool poor. Otherwise, ... Why not use a plugin? Why not use system() (and macos's or linux's uniq)? Going through a list to do uniq should be an O(n) action. Sorting is O(n)log(n) (or O(n^2) for some algorithms), and so speed is more important.

This process logically would re-invent lots of tools and embed them in vim (admittedly, uniq is likely to be a small one). However, there's lots of tools that Windows lacks that "would be nice" to have -- but should vim have it?

Regards,
Chip Campbell


--
--
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