Help design a language: What about tuples without commas?

edA‑qa mort‑ora‑y - Mar 28 '18 - - Dev Community

I see that you like to give feedback about language design. How about contributing to the design a new and evolving language: Leaf.

Even if not interested in an actual new language, feel free to participate.

Let's start off with a simple syntax decision. Should you be allowed to write tuples without commas, much like I allow statements without semicolons:

A tuple with commas:

var items = [
    one,
    two,
    three,
]
Enter fullscreen mode Exit fullscreen mode

A tuple without commas:

var items = [
    one
    two
    three
]
Enter fullscreen mode Exit fullscreen mode

The second one relies on line-endings to split values. If you need to do an inline tuple on one-line the comma form would always be available [one, two, three].

Treat these as "arrays without commas" if you wish to ignore that "tuple" part of the question.

Ask, Comment, Criticise

I'm going to leave these questions a bit open, without too much background or motivation. It's helpful to get a kind of instinctive response. I obviously have opinions, but am quite open to changing my language.

Please ask questions, about language design, syntax, compilers, or whatever you'd like. Sometimes there are details that help you decide, sometimes you may just be curious. For example, it's reasonable to ask "Are there any technical parsing problems that arise from removing these comma's?"

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player