Skip to content

Additional property to allow inline functions will be nice (was removed from version 3.0.3) #300

Description

@VasylHulpak
double(x) = x * 2;
dd(a, b) = a + b;

double(5) + add(2, 3)

Expected Behavior

  • Functions can be defined using a lightweight syntax (e.g. fn name(params) = expression)
  • Functions are scoped locally to the expression
  • Functions can be reused within the same expression
  • No global state pollution unless explicitly allowed
  • Backward compatible with existing expressions

🧪 Use Cases

  • Dynamic computed fields in UI grids
  • Configuration-driven formula systems
  • Data transformation pipelines
  • Business rule engines
  • Reducing duplication in expression-heavy systems

🔄 Alternatives Considered

  • External function registry (already supported but not inline)
  • Preprocessing expressions before evaluation
  • Migrating to AST-based engines such as mathjs
  • Wrapping expressions in custom evaluation layers

⚠️ Migration / Compatibility Notes

  • Feature should be opt-in (e.g. allowInlineFunctions: true)
  • Existing expressions must continue working without changes
  • Invalid inline function syntax should fail gracefully when disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions