Benoît is a self-interpreting, self-evolving, self-proving programming language where every line is simultaneously code, test, proof, and documentation. Version 0.8.0 runs .ben files natively via a Pratt parser and tree-walking evaluator (zero eval, zero new Function), offers 68% token reduction compared to equivalent JavaScript, and includes a genetic algorithm (evolve.mjs) that discovers functions from assertions alone with 80% success rate. Active development with monthly releases, it targets Node >=18 and focuses on human-AI collaboration, pattern matching with guards, pipes, async/await, and a built-in property inference engine that detects 31 mathematical properties automatically. Unlike traditional languages, there is no separation between code, tests, and documentation.
npm install benoitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to run Benoît code inline via runBen, verifying assertions directly from a string. The language ships with full TypeScript definitions.
Use import syntax instead of require(). Update Node to >=12 and set "type": "module" in package.json.
Replace compile with transpile in imports. compile is no longer exported.
If using default import, adjust usage to new shape. Use named exports for specific operations.
Replace evalBen with runBen. evalBen remains for backward compatibility but will be removed in next major.
Use 'when condition ->' inside alt patterns, not 'if condition ->'.
Do not assume Benoît code runs faster; it is a syntactic compaction tool.
Use dynamic import or switch to ESM: import benoit from 'benoit'.
Use import { transpile } from 'benoit' instead.Ensure guard '?' follows the pattern arrow correctly: pattern -> guard? -> expr.
Call runBen with a string or a path, not an options object.
No dependency data recorded yet.