Skip to content

Support formatted string literals #1811

Closed
@CodebyCR

Description

@CodebyCR

Why is the default #print function working in this why:

 var x = 7;
 Print("The value of x: {0} ", x)

Instated of the formatted Python string or the Swift print function:

In Python:

 var x = 7
 print(f"The value of x: {x} ")

In Swift:

 var x = 7;
 print("The value of x: \(x) ")

In my opinion this represents the future way, and is a lot more intuitive.
If there are no valid reasons for doing so, one should accept this adjustment.

My favoured solution is:

 var x = 7;
 Print("The value of x: {x} ")

and by default '{' and '}' must be masked by '\', if you want to see them in a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    leads questionA question for the leads team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions