Derek Peirce
03/13/2026, 11:25 PM"array: ${arr.contentToString()}" gets rather verbose. Perhaps "array: $[arr]"? (As an added bonus, the string builder could avoid the intermediate array string and add each element to the result StringBuilder directly, and the same syntax could be used to efficiently add strings from other iterables.) Or would the need to preserve backwards compatibility kill any attempt to add more features to String literals?Joffrey
03/14/2026, 6:59 AMDerek Peirce
03/14/2026, 7:10 AMArray<T>, I agree, but there are still significant use cases for IntArray and the like so long as Array<Int> requires boxing.Joffrey
03/14/2026, 7:15 AMJoffrey
03/14/2026, 7:16 AMDerek Peirce
03/14/2026, 7:20 AMArray<T>, IntArray, etc. inputs and outputs. I expect this would be primarily useful for debugging code that needs the strong performance efficiency of non-boxed primitives. (Debugging with the debugger is usually better than print statements, but there are still many times where direct strings are quite useful.)