You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, Lurk treats (.lurk.meta.def a 123) and !(.lurk.meta.def a 123) (or !(def a 123), equivalently) differently, and only the latter variant with the explicit ! is understood as a meta command.
Both cases should instead be treated the same way, working as a meta command.
This does mean that (open ...) could be technically ambiguous if both .lurk.builtin and .lurk.meta are imported. The .lurk.builtin.open symbol should shadow the .lurk.meta.open symbol, so open is read as .lurk.builtin.open, and !(open ...) should be a reader shortcut for explicitly naming (.lurk.meta.open ...). This ensures we maintain the current behavior.
Whether this is done by having .lurk-user import .lurk.meta and then .lurk.builtin and having the latter import shadow the first, or by continuing to not import .lurk.meta and requiring the ! syntax on the REPL to name the meta symbols should not matter too much right now. The former is the intended behavior however, and should be preferred unless it causes issues.
Also need to double check that this does not cause issues with any demos or existing meta commands.
The text was updated successfully, but these errors were encountered:
wwared
changed the title
Make ! optional when reading meta commands
Make ! actually optional when reading meta commands
Feb 18, 2025
Right now, Lurk treats
(.lurk.meta.def a 123)
and!(.lurk.meta.def a 123)
(or!(def a 123)
, equivalently) differently, and only the latter variant with the explicit!
is understood as a meta command.Both cases should instead be treated the same way, working as a meta command.
This does mean that
(open ...)
could be technically ambiguous if both.lurk.builtin
and.lurk.meta
are imported. The.lurk.builtin.open
symbol should shadow the.lurk.meta.open
symbol, soopen
is read as.lurk.builtin.open
, and!(open ...)
should be a reader shortcut for explicitly naming(.lurk.meta.open ...)
. This ensures we maintain the current behavior.Whether this is done by having
.lurk-user
import.lurk.meta
and then.lurk.builtin
and having the latter import shadow the first, or by continuing to not import.lurk.meta
and requiring the!
syntax on the REPL to name the meta symbols should not matter too much right now. The former is the intended behavior however, and should be preferred unless it causes issues.Also need to double check that this does not cause issues with any demos or existing meta commands.
The text was updated successfully, but these errors were encountered: