A suggestion to improve Text Blocks

P Holder pholder at gmail.com
Thu Jan 16 23:26:23 UTC 2020


I would like to see the compiler be able to do a little more work
while compiling Text Blocks, and to be able to handle these cases
intelligently by treating each line (where it would have emitted a
newline) as a separate element.

String[] itemsInArray = """
  Apple
  Orange
  Banana
  Kiwi
  """;
which would result in itemsInArray [4], where itemsInArray[0] =
"Apple" and itemsInArray[3] = "Kiwi"

List<String> itemsInArray = """
  Apple
  Orange
  Banana
  Kiwi
  """;
which would result in an unmodifiable List<String> with entries like
"Apple", "Orange", etc.


More information about the amber-dev mailing list