On Thu, Apr 30, 2020 at 2:56 PM Michael Orlitzky <mich...@orlitzky.com>
wrote:

> On 4/30/20 2:10 PM, John H Palmieri wrote:
>
> >
> > They're doctested, and they still work. What makes the implementation
> > bad? They use standard Python library tools to walk a directory tree and
> > then to do a regexp search on the files there. An advantage to this
> > approach is that it is standard across platforms, as opposed to
> > implementations of grep which differ on linux vs OS X (not to mention
> > Solaris and others).
>
> Most of the features of grep are standard:
>
>   https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
>
> The implementation in sage is,
>
>   * slow
>   * a weak, leaky abstraction (it's a thin wrapper around python
>     regex that doesn't expose all of the options and doesn't document
>     all of the details)
>   * redundant (we already require grep to build sage)
>   * only able to search one directory tree (not reusable knowledge
>     anywhere but in src/sage, unlike grep)
>   * a new syntax to learn on top of the syntax for grep, for most people
>   * code that we have to maintain forever
>   * code that has to be doctested 1000 times a day forever
>
> It just doesn't need to be there. Users are better served by learning
> how to use grep, and everyone would benefit from not having to
> maintain/load/test it indefinitely.
>

I understand where the criticism is coming from, but I think one of the big
plusses of search_src and friends is that they're usable from the sage
command line without switching context to the command line.  I don't think
they should be removed.
David


> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/5a14fb7f-4e12-c26c-7cf1-2590cf1e3481%40orlitzky.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAChs6_k7iQir3njCk_jmwAXWhcAb9LF8-68eoGmayVuWf4tesw%40mail.gmail.com.

Reply via email to