This would be fine by me!

On Fri, May 31, 2019 at 2:07 PM Matthew Butterick <m...@mbtype.com> wrote:

> Maybe the whole syntax of `define-meta` is idiosyncratic and we could add
> (without breaking any compatibility):
>
> ◊(meta-set! 'key (* 6 7))
>
> Since `metas` is a hash, `meta-set!` would echo `hash-set!`. And as with
> `hash-set!`, the key and value would be expressions.
>
>
> > On May 29, 2019, at 3:28 PM, Matthew Butterick <m...@mbtype.com> wrote:
> >
> > 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.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Pollen" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pollenpub+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pollenpub/E38816E6-5D29-4916-8EC3-40F14B3188E0%40mbtype.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pollenpub/CAOdqJSjmDgW5LN3Hb8e%3DCXChnt8doGpzcEQOhdaFQ58HryTWvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to