re: What do you dislike about your favorite language? VIEW POST

VIEW FULL DISCUSSION
 

In Java and Kotlin, I usually create literal arrays with each item on a new line and all columns lined up nicely. To add a new item, I can then just copy any line and change what I need. To edit all items at once I just add a carat at the beginning of each line and off I go.

EXCEPT FOR THE LAST LINE WHICH DOESN'T HAVE A COMMA.

val items = arrayOf(
    Item(1, "One",   1.1),
    Item(2, "Two",   2.2),
    Item(3, "Three", 3.3),
    Item(4, "Four",  4.4),
    Item(5, "Five",  5.5) // <-- I want to put a comma here so badly!
)
code of conduct - report abuse