[Top][All Lists]

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

Re: A read-based grep-like for symbols (el-search?) (was Do shorthands b

From: Dmitry Gutov
Subject: Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))
Date: Fri, 1 Oct 2021 17:30:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 01.10.2021 16:15, João Távora wrote:
Language design never has been held back by the particular assumptions
of a search tool, popular and ubiquitous as it may be.

Certain language designers intentionally limit the language's power due to usability considerations, keeping in mind their audience.

Speaking of shorthands, if only the "local" part of every symbol's name was something reliable (as is often the case in module/package systems out there), we could still implement the search for references using Grep fairly efficiently: you Grep across the files for the local name, and then post-filter the references by looking at the end of the file.

If that approach is not feasible, we're limited to searching for the instances of 'require' forms (when the symbol/function can be mapped to a package name) and then searching inside every such file on the second pass.

read-ing the contents of every Lisp file is pretty expensive, in comparison.

reply via email to

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