skx / yal

Yet another lisp interpreter
GNU General Public License v2.0
16 stars 0 forks source link

Allow setting the help-text, by name, as well as retrieving it #141

Closed skx closed 1 year ago

skx commented 1 year ago

This is going to be required at the point that I start thinking about native functions.

I want to replace "(sin)" with "(math.Sin)" (golang), which means that I no longer have a place to set the text. Something like this:

(alias sin math.Sin)
(help "sin" "Sin returns the sine of the radian argument.")

Unfortunately this means extending things so that (help sin) and (help "sin") are interchangeable - as at the point we have migrated we'll not have a sin-symbol to resolve, and even if we did it would not be a primitive.Procedure.

This is a trivial thing until I've actually implemented the reflection/go-based stuff which is tracked in #139, but it seems like it is going to be necessary.