Skip to content

Document native JavaScript syntax for eDSLs - #1495

Closed
sergey-shandar wants to merge 1 commit into
mainfrom
agent-edsl-native-js-syntax
Closed

Document native JavaScript syntax for eDSLs#1495
sergey-shandar wants to merge 1 commit into
mainfrom
agent-edsl-native-js-syntax

Conversation

@sergey-shandar

Copy link
Copy Markdown
Contributor

Summary

Document a general FunctionalScript eDSL design principle in AGENTS.md:

  • reuse ordinary JavaScript literals and structures when their JavaScript meaning already matches the DSL meaning;
  • introduce constructors/tags only for concepts that JavaScript cannot express directly or where the ordinary shape would be ambiguous;
  • allow the ergonomic authoring representation to normalize to a different internal tagged AST when useful;
  • apply the same principle to the future FunctionalScript function AST.

This captures the direction already visible in RTTI and the shared NaNVM operator-test data, where ordinary values are more readable than tagging every primitive and collection.

Impact

Documentation/design guidance only. No runtime or public API changes, so no CHANGELOG entry is needed.

Validation

Compared the branch against main: only AGENTS.md changes, with 24 added lines and no deletions.

@sergey-shandar
sergey-shandar force-pushed the agent-edsl-native-js-syntax branch from 52e3e67 to 023c734 Compare August 12, 2026 02:35
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
functionalscript 023c734 Commit Preview URL

Branch Preview URL
Aug 12 2026, 02:36 AM

@o2alexanderfedin o2alexanderfedin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 023c7347dd707e097e05ae0ae754f2a7c73b424c.

This and #1496 are the same change written twice — both insert ### 5.8 at the same
point in AGENTS.md from the same pre-image (f4164b61d), so they conflict by
construction and only one should land. The text here is accurate and §8.3 does exempt
AGENTS.md from a CHANGELOG entry, so this is purely a question of which draft to keep.

I put the comparison on #1496, which is the one I'd keep — it carries the RTTI and NaNVM
evidence in the added text rather than only in the PR body, and it states which layer the
public API should be optimized for rather than only permitting the two layers to differ.

The one substantive thing this version does that #1496 doesn't is name existing eDSLs —
"HTML, BNF, RTTI, generated-code/test descriptions" — as targets for the principle. That
cuts both ways: BNF's tagged encoding is deliberate and settled, so naming it reads as an
invitation to revisit a closed design. If you keep this one instead, that list is the part
I'd narrow.

Still a draft, so no approval either way.

@sergey-shandar
sergey-shandar deleted the agent-edsl-native-js-syntax branch August 12, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants