define-metas and select-from-metas have inconsistent signature #184

Closed
opened 6 years ago by sorawee · 1 comments
sorawee commented 6 years ago (Migrated from github.com)

In a sense that I can:

(define-metas foo (1 2 3))

and there's no error, but then when I (select-from-metas 'foo metas), I get a contract error that '(1 2 3) is not a xexpr.

I see no reason why we should limit metas to just xexpr (for example, it might be useful to have a metadata about raw date and time, which can be represented as a list of numbers), but if restricting to only xexpr is your decision, it probably should error out at define-metas, not select-from-metas.

In a sense that I can: ``` (define-metas foo (1 2 3)) ``` and there's no error, but then when I `(select-from-metas 'foo metas)`, I get a contract error that `'(1 2 3)` is not a `xexpr`. I see no reason why we should limit metas to just `xexpr` (for example, it might be useful to have a metadata about raw date and time, which can be represented as a list of numbers), but if restricting to only `xexpr` is your decision, it probably should error out at `define-metas`, not `select-from-metas`.
mbutterick commented 6 years ago (Migrated from github.com)

I suppose you're right that a meta value needn't be restricted to an xexpr. However, metas are extracted before the file is run, and cached to disk, so the meta value still needs to be something that is a) not computed and b) serializable.

I suppose you're right that a meta value needn't be restricted to an `xexpr`. However, `metas` are extracted before the file is run, and cached to disk, so the meta value still needs to be something that is a) not computed and b) serializable.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#184
Loading…
There is no content yet.