On Wednesday, 7 September 2016 17:57:32 PDT Parrot Raiser wrote:
> This isn't a request for a feature, merely a thought experiment. We're
> still in the phase where it's more important to ensure that existing
> features work properly than add new ones.
> 
> How difficult would it be to include a mechanism within the REPL to
> select either documentation or an example, (possibly from the test
> suite), for a particular command? Selection might be by some control
> key combination,  cursor positioning, or an alternative to "enter" at
> the end of the line. The purpose would be to speed development, by
> enabling an inexperienced developer to look up details while testing.
> 
> Syntax errors generate messages which attempt to provide help; could
> this provide the basis for a "help" mechanism? Would this be useful?
> 
> Opinions?

Well, this sounds like a job for the meta-object protocol (specifically, 
`.WHY`):

https://docs.perl6.org/language/mop#WHY

The simplest option for handling this in the REPL is probably to have some 
sort of automatic handling of Pod sent to sink context, rendering it and 
sending it to a pager. Then, the user could simply do

>> Hash.WHY
(LET THERE BE DOCS!)

And there would be docs.

Reply via email to