Matthew Butterick
unread,May 29, 2019, 6:28:57 PM5/29/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pollen
tl;dr
1) Would it be useful to allow meta values to be expressions, not merely datums?
2) Is anyone using identifiers or lists as meta values? Mostly my impression is that they're usually strings, numbers, or booleans (whose meaning wouldn't change with this upgrade).
I was thinking that it would be easy to make meta values expressions rather than datums, so that something like this:
◊(define-meta foo (* 6 7))
Means that the `foo` meta is 42.
You could, in theory, run anything you wanted there:
◊(define meta bar (let () (local-require every/module) (do-a-zillion-things))
This isn't quite backward-compatible. Datums that are self-quoting, like strings, numbers, and booleans, are the same under either system.
But things that look like evaluatable expressions — especially naked identifiers and lists — would be different.
◊(define-meta id bar)
Today, this results in a meta value of `'bar`. But if meta values are treated as expressions, it would just be `bar`, and trigger an unbound-identifier error.
Or again consider:
◊(define-meta foo (* 6 7))
Today, this results in a value of `'(* 6 7)`, but it would not under the new system.
I can't really tell, however, whether the theoretical benefits outweigh the theoretical costs.