Skip to content

Feature: Support string concatenation with + operator #412

Closed

Description

@godofecht

Description

Flow does not support string concatenation with the + operator. Attempting to concatenate strings fails to compile.

Reproduction

function main() -> i32 {
    let prefix: string = "  "
    let indent: string = prefix + "  "
    print(indent)
    return 0
}

This fails to compile.

Expected behavior

The + operator should concatenate two strings and produce a new string.

Workaround

Build output incrementally using print() calls in loops instead of constructing strings:

let mut i: i32 = 0
while i < depth {
    print("  ")
    i = i + 1
}

Impact

Discovered in flow-scikit tree.flow while implementing export_tree_text. Tree visualization, text formatting, and any code that builds strings dynamically is affected. The workaround works but produces output one piece at a time rather than constructing a single string.

Activity

  1. added
    enhancement
    on Aug 11, 2026
  2. godofecht commented on Aug 11, 2026

    @godofecht
    ContributorAuthor

    Fixed in PR #419 (merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions