Enums can currently hold data in their variants but can't define methods. If you want behavior tied to an enum, you have to write a free function and match on it externally — which scatters logic that logically belongs together.
Being able to write:
```
enum Shape {
Circle(radius: float)
Rect(w: float, h: float)
area(): float {
match self {
Circle(r) => 3.14159 * r * r
Rect(w, h) => w * h
}
}
}
```
...and call `shape.area()` would make enums significantly more useful as a modeling tool.
Enums can currently hold data in their variants but can't define methods. If you want behavior tied to an enum, you have to write a free function and match on it externally — which scatters logic that logically belongs together.
Being able to write:
```
enum Shape {
Circle(radius: float)
Rect(w: float, h: float)
}
```
...and call `shape.area()` would make enums significantly more useful as a modeling tool.