Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Avoid using magic number indexes in the node system

Open Keavon opened this issue 7 months ago • 2 comments

There are tons of fragile index values like 0, 1, 2, etc. used to reference inputs and outputs (amongst other things?) between nodes and node internals. This is extremely fragile, makes it hard to refactor, provides a difficult developer experience, lacks self-documenting clarity, and is hard to debug.

One potential solution could be using enums. But thinking through some alternative ways to achieve this could also be good.

Keavon avatar Dec 07 '23 13:12 Keavon