refactor: extract abstract Expression interface #30
Reference in New Issue
Block a user
Delete Branch "refactor/expression-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The codebase currently couples the engine and plugins directly to
lambda.Expression.This PR introduces an abstract
expr.Expressioninterface to enable future support for multiple evaluation modes.pkg/expr/expr.gowith anExpressioninterface requiring aString()method.lambda.Expressionto embedexpr.Expression.String()method toAbstraction,Application, andVariabletypes.String()instead oflambda.Stringify().Decisions
expr.Expressioninterface is minimal (onlyString()) to avoid over-constraining future expression types.*lambda.Expressiondirectly rather thanexpr.Expression, because Go's interface semantics require pointer indirection for in-place mutation during reduction.expr.Expression.Benefits
String()method, making them more decoupled from the lambda-specific implementation.Checklist
<type>/<description>).