Skip to content

Supports: new #4

@kekyo

Description

@kekyo

In the current syntax and implementation, JS objects are treated as constructor calls, so Date ‘2026/2/1’ is interpreted as new Date(‘2026/2/1’). In this case, function calls cannot be made on JS objects.

While we might not frequently want to execute this, to distinguish these calls, we might consider introducing a new function.

{{
set d1 (new Date '2026/2/1')  // Constructor call
set d2 (Date '2026/2/1')      // Function call
}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions