metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.47k stars 209 forks source link

General typography question: `Entity`, `entity?`, `entity-schema`? #463

Open piotr-yuxuan opened 3 years ago

piotr-yuxuan commented 3 years ago

Hello, thanks for this very well-thought tool!

The README of this lib usually names schemas like Address, Age, but also abcd, my-schema, and obviously a datum schema can be named int? or boolean?. The style guide of @bbatsov talks about types and suggests CapitalCase. Would we have some general rules of thumb when it comes to naming conventions for malli schemas?

If I were to suggest some, I would go for:

It may or may not look like bikeshedding, sorry for that 😅

Cheers! 👍

ikitommi commented 3 years ago

Thanks. Sounds about what I have though about it. Also registry references should have a naming guide.

Just wrote the function schema guide and was wondering what is a good name for a function schema. Ended up with =>plus, which is far from perfect.

piotr-yuxuan commented 2 years ago

I would suggest that plus-schema denotes a function returning a schema, but I agree it is far from perfect, albeit kind of explicit.