docs: Properties chapter of the Ixa Book#866
Conversation
cc85c13 to
ed53d56
Compare
ed53d56 to
e8d152b
Compare
There was a problem hiding this comment.
Overall I think this is a very helpful chapter. I learned a lot while reading it!
As I read, I fiddled with the text; see my suggestions. It's mostly minor reorderings or rewordings, in ways that made things easier for me to understand.
A few things I wanted to call out:
- All properties take on values immediately upon creation of an entity. Is it idiomatic ixa to make properties that are Options for things you haven't implemented yet? Or is that straying into data plugin territory?
- You set up the explicit vs. constant vs. derived divide, but I think it should really just be derived vs. not.
- I think it's very intuitive that a property can have a default value upon instantiation. This just feels like a nice convenience, not something deep about classes of properties.
- If you do keep the three-way division, I'd recommend against calling them "constant," which is confusing, because you can set them to whatever.
- While I'm here I'll also recommend replacing "non-derived" with "base" or "source," or something that clarifies what it actually is.
- I would re-organize a little bit, to start with non-derived properties and
define_property!and how to use them, then go one step deeper and say thatdefine_property!is just a nice wrapper aroundimpl_property!, and then go into derived properties only after that. I can take a go at that if you think it would be helpful. - Does Beau's thing, about wanting to use an enum for edge types, to avoid duplicating a value associated with that edge, match with the motivation for canonical values?
- I think it's useful to know that the same property type (eg
Age) can be defined for multiple entities, and it's nice to know that that happens via implementing egProperty<Person>, but it's a little confusing because no one should be every writingimpl Property<Person> for Agethemsevles.
92b9a5b to
8bb31e9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
@RobertJacobsonCDC I recommend you merge this; I was pointing an analyst to it, and I think it's way better than nothing! |
k88hudson-cfa
left a comment
There was a problem hiding this comment.
Looks good with follow-up comments from scott
|
Thanks for all this feedback, @swo ! Some comments:
Yes, and this is worth adding to this chapter. I'll add a section to make this explicit. (It's mentioned in the section on custom display functions.)
Well, not exactly. I make this distinction for initialization modes only. But if you find it confusing, others will to. Let me tweak some language to make this more clear.
This language comes from our need to distinguish between a "default" that is dynamically computed versus a default that is provided as a static constant in the property definition. So the adjective refers to the value being assigned to the property rather than the property itself. We no longer support dynamically computing default values, so the distinction is vestigial. It probably makes sense to just call it "default value". But that's an API change out of scope of this PR. I'll open a separate ticket for it.
I think I did a bit of reorganizing since your review that makes it closer to your suggestion. I'm doing another pass. Let me push my changes incorporating your feedback. But actually, if you're feeling motivated to work on Ixa documentation, we probably have a greater need for user guide material for topics that aren't covered at all. I made a Of course, any and all feedback and contributions are gold.
I don't know. I'm not familiar with Beau's design for edge types.
Right. I try to put this front and center when I introduce the list of macros. I also use the example of using the same type as a property for multiple entity types under the "When to use For some of these things, I wonder if it would be helpful to have a whole chapter devoted to answering questions of the form, "How do I do X?" Or maybe a chapter of common "modeling patterns"? (Or both?) |
8bb31e9 to
7a2143f
Compare
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
This PR adds a chapter all about properties to the Ixa Book, including a section on implementing
EqandHash. The source file isdocs/book/src/topics/properties.md. (The GitHub rendered markdown file is here.)To render the book locally:
Then open
website/book/topics/properties.html.