Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This looks interesting as an approach to relating schema to data types. One aspect that feels very counter-intuitive/unidiomatic is that, if I understand correctly, in your example there is no Schema enum. Usually this sort of macro does not erase the type defined, and I would find it extremely confusing that I cannot reference, say, Schema::User{..}. It would be clearer to me if this were defined inside of a macro_rules macro, more like lazy_static e.g.

``` schema!{ User { name: String, }, Story { author: User, title: String, content: String, }, } ```



I was just about to ask WTF is a Schema-typed value supposed to represent.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: