From b35d11fdb6853f6bf254be261cd6ece47efa2e91 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 22 May 2026 13:07:17 +0300 Subject: 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. --- internal/rpn/operations.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal') 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 -- cgit v1.2.3