DEV Community

Discussion on: Help design a language: What about tuples without commas?

 
mortoray profile image
edA‑qa mort‑ora‑y

I think the inline versus multiline choice depends on what type of code you are writing. Anything that involves a logical list of items I prefer newlines.

var items = [
  item_one,
  item_two(args),
  1 + 2,
]

But, sometimes I have little tuples, like points, that would be burdensome, and unclear to do multiline:

var a : point = [1,2]
var b = pt_a + [3,4]