Skip to content

[Proposal]: Change public fields to properties #9

@MechWarrior99

Description

@MechWarrior99

Summary

Change all public fields to either be properties or to private fields if applicable.

Motivation

There are numerus advantages to properties over fields, which include being able restrict setting the value of properties, more clearly communicate the intended usage of it, and being able to change how they function without introducing breaking changes. For BMesh specifically this would be especially useful to prevent manually setting the values of properties like Edge.loop.
Public fields also do not follow the C# design guidelines

Drawbacks

This is a breaking change as it would also involve renaming all fields from using camelCasing to PascalCasing to follow C# design guidelines for property naming.
It would be a breaking change for anyone that is setting a value of a field that is changed to a get only property. However they should not be doing that anyways so that would be desired I believe.

I would be happy to create a PR with required changes if it is desired after any further discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions