hyperledger / hyperledger/fabric

Consider switching to `github.com/antonmedv/expr` for expression evaluation

Open
#4,379 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

### Current Status

Hello,

I'd like to recommend considering a change in the expression evaluation library you currently use (`github.com/Knetic/govaluate`) to `github.com/antonmedv/expr`. Here's a concise rundown of the advantages `expr` offers:

1. **Safety & Isolation:** Prevents access to the Go runtime and its reflection.
2. **Memory-Safe:** Guards against common vulnerabilities like buffer overflows.
3. **Side-Effect-Free:** Ensures predictable and reliable evaluations.
4. **Always Terminating:** No risk of deadlocks; ensures performance isn't hindered.
5. **Static Typing:** Catches type errors early, enhancing robustness.
6. **Optimized for Speed:** Faster evaluations for improved overall performance.

Given these advantages, I believe `expr` might better serve the needs of your project. Your feedback or thoughts would be appreciated.

Best regards,
Anton

### Expected

N/A

### Solution

_No response_

### Please let us know if you plan to work on this.

Maybe.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.