RANDOMBYTES.PRO

Optimize for search - imply no context

One way to improve Code searchability is to remember there is no local context in search window. #todo: elaborate more, maybe some examples needed

Nice illustration from Effective Go (with my emphasis):

If every doc comment begins with the name of the item it describes, you can use the doc subcommand of the go tool and run the output through grep. Imagine you couldn't remember the name "Compile" but were looking for the parsing function for regular expressions, so you ran the command, $ go doc -all regexp | grep -i parse If all the doc comments in the package began, "This function...", grep wouldn't help you remember the name. But because the package starts each doc comment with the name, you'd see something like this, which recalls the word you're looking for.

	Compile parses a regular expression and returns, if successful, a Regexp
	MustCompile is like Compile but panics if the expression cannot be parsed.

Meta

Created: 2021-10-04

References: