// Demonstrating string interpolation in Lux // // Expected output: // Hello, Alice! // The answer is 42 // 2 + 3 = 5 // Nested: Hello, Bob! You are 25 years old. // Escaped braces: {literal} and more {text} // Basic interpolation let name = "Alice" let greeting = "Hello, {name}!" // Number interpolation (auto-converts with toString) let answer = 42 let message = "The answer is {answer}" // Expression interpolation let x = 2 let y = 3 let math = "{x} + {y} = {x + y}" // Multiple interpolations let person = "Bob" let age = 25 let intro = "Nested: Hello, {person}! You are {age} years old." // Escaped braces (use \{ and \}) let escaped = "Escaped braces: \{literal\} and more \{text\}" fn printResults(): Unit with {Console} = { Console.print(greeting) Console.print(message) Console.print(math) Console.print(intro) Console.print(escaped) } let output = run printResults() with {}