marius311/CompositeStructs.jl

minor comments

JeffreySarnoff opened this issue · 3 comments

It would help to show a second example where the structs are not parameterized.

The macro name @extends is applied to the struct that is-an-extension-of another struct; @extended would be clearer.

Likewise, the module could be ExtendedStructs.jl. up2you.

Hey, thanks for the comments, will get a non-parametric example in there.

Regarding the name, I'm not in love with the current name, but somehow @extended is no less ambiguous to me, maybe even more, because unlike extends which is only a verb, extended is both a past tense verb and an adjective, as in "Bar extended Foo" (good) or "Bar is extended" (bad, Foo was extended to produce Bar). I think I mainly went with this choice inspired by Java, not thats a great reason at all.

Another idea is @component struct ... and ComponentStructs.jl, mirroring the not-dissimilar ComponentArrays.jl? Or maybe some other adjective modifying "struct" rather than either of "Foo" or "Bar", so that its not ambiguous.

CompositeStructs.jl @composite

I like that! I went with it, thanks!