Elements icon indicating copy to clipboard operation
Elements copied to clipboard

Remove Name property from Element.

Open ikeough opened this issue 4 years ago • 2 comments

I never use the Name property on Element. It clutters constructors, even as a default value, and does nothing to improve the semantics of an Element. Where someone wants to use a string identifier, they are free to add one using a schema.

ikeough avatar Jan 28 '21 15:01 ikeough

many schemas use the "Name" property to contain useful information. This would be a breaking change for a great many schemas. Not saying we don't do it, but....

andrewheumann avatar Jan 28 '21 16:01 andrewheumann

I'm well aware of what would break. We are trying to improve the design of Elements before 1.0. The good news is that we own most everything that would currently break. The argument here should not be about breaking things. It should be about whether all Elements needs the Name property.

Material.Name makes sense. Profile.Name makes sense (sort of). Representation.Name less so. MySpecialElementType.Name: this will almost always be left null. MySpecialElementType.ManufacturerId: this is semantically relevant.

ikeough avatar Jan 28 '21 21:01 ikeough

I was wrong. We use this all over the place now.

ikeough avatar Apr 14 '23 23:04 ikeough