cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.31k stars 71 forks source link

Stop using bit flags when not necessary #978

Closed kkoreilly closed 2 weeks ago

kkoreilly commented 2 weeks ago

This PR removes tree.NodeFlags, all of the flag types that extended it, and various other bit flag types, which increases convenience, clarity, consistency, and concision, while also slightly reducing memory usage in most cases. Overall, it does not make sense to use bit flags unless there are a ton of them, and the contrived tree system for flags was exclusively deleterious.