-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider removing the "shape" moniker from abstraction APIs #76
Comments
I think I'm hesitant to embrace "schema" because this library doesn't directly represent how objects are serialized, and schema in my mind dictates the structure of how something is serialized. But it's close, so I'd be ok with it, except that Nerdbank.MessagePack already has its own concept of schema, which documents exactly the serialized shape/structure/schema for a given type graph. Having "schema" used both in polytype and my library may confuse the user. So just brainstorming here... |
Agreed, although nothing prevents the abstractions from being extended to include method invocation like with constructors (apart from lacking a strong motivating use case). The underlying concept is strongly typed reflection fundamentally. |
I agree to remove "shape" terminology, it does create confusion. I agree that
Just a thought - but the library is called |
Does
I think of "PolyType" more as the brand/repo/NuGet package name. Seems appropriate enough for namespaces but perhaps not as necessary for its types? |
Just my 2 pence as an interested bystander: I liked Shape. Once I knew what it was, it made perfect sense as an abstraction that describes a type. Also, reflection is a "dirty" word in my circles, and one of the most exciting things about this library for me is the source generated metadata that can (mostly) avoid reflection. Schema is too overloaded a term, and I would find it confusing keeping one schema straight from another, especially when I need to do a little lower level work with serialization. Of the current suggestions, I think "Spec" is a good direction. Here's a few curveballs that might inspire an idea: ITypePlan, IDataBlueprint. |
Consider #80 when thinking of the name |
The use of the term "shape" in the core abstractions is inherited from the F# TypeShape library. It was intended as a synonym to terms like "schema" or "spec", but in practice I suspect it's introducing more ambiguity than it should. We could either
ITypeSchema
orITypeSpec
.IType
,IEnumerableType
,ITypeVisitor
, andIShapeable<T>
would be renamed to something likeIReflectable<T>
.cc @AArnott @eerhardt
The text was updated successfully, but these errors were encountered: