diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-22 13:07:17 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-22 13:07:17 +0300 |
| commit | b35d11fdb6853f6bf254be261cd6ece47efa2e91 (patch) | |
| tree | fec96189939d158bee7a412af3a530709314f80c /internal/rpn/operations.go | |
| parent | ff122fc1ea07ed4fe945a2dd6070878b2c699446 (diff) | |
doc(rpn): document Operator interface design trade-off
Task ee: Added comment explaining why Operator mixes behavioral methods
with configuration/metric methods. Rationale: RPN is the sole client;
splitting would add indirection without practical benefit.
Diffstat (limited to 'internal/rpn/operations.go')
| -rw-r--r-- | internal/rpn/operations.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go index d45ffd1..f9c3c1f 100644 --- a/internal/rpn/operations.go +++ b/internal/rpn/operations.go @@ -146,6 +146,12 @@ type PowerIntOperator interface { // Operator is the combined interface for all operator implementations. // This allows RPN to depend on an abstraction instead of the concrete Operations type. +// +// Design note: Operator intentionally mixes behavioral methods (arithmetic, stack, +// boolean ops) with configuration methods (SetMode, SetPrefixMode, GetPrefixMode) +// and metric command handlers. Per ISP this could be split, but RPN is the sole +// client and splitting would add indirection without practical benefit. The +// concrete *Operations type satisfies this interface exclusively. type Operator interface { ArithmeticOperator BooleanOperator |
