| ▲ | rapind 4 days ago |
| Let this sink in though: [ 'apple'
, 'banana'
, 'orange'
]
|
|
| ▲ | maest 4 days ago | parent | next [-] |
| That makes prepending an element a special case. |
| |
| ▲ | ParetoOptimal 3 days ago | parent [-] | | It makes it easier to read though because the least important parts are most easily ignored. The reader can focus on the contents of the list. | | |
| ▲ | 3pt14159 3 days ago | parent | next [-] | | I don't really know why we even need commas for lists of things. Just use the white space. | |
| ▲ | bogomog 3 days ago | parent | prev [-] | | I find it jarring compared to commas after the words, making the commas unnecessarily prominent. |
|
|
|
| ▲ | JBiserkov 4 days ago | parent | prev | next [-] |
| In Clojure, commas are treated as whitespace and are thus completely optional. |
|
| ▲ | Nevermark 4 days ago | parent | prev [-] |
| This is so clearly superior. Delimiters are prefixes. But the scale of technical debt this insight has revealed is depressing. |
| |
| ▲ | citizenkeen 4 days ago | parent [-] | | Saying this is clearly superior means you don’t keep your lists sorted. A sorted list is as likely to add something to the beginning as the end, where this solution has the same problem. | | |
| ▲ | Nevermark 4 days ago | parent | next [-] | | I just reverse the sort order when that case happens. | |
| ▲ | setr 4 days ago | parent | prev [-] | | The only correct syntax/format [
, a
, b
, c
]
If only there existed a language designer intelligent enough to support it | | |
| ▲ | maccard 4 days ago | parent | next [-] | | You want yaml key:
- a
- b
- c
| |
| ▲ | MonkeyClub 3 days ago | parent | prev | next [-] | | Lisp: (
a
b
c
)
| |
| ▲ | crazygringo 3 days ago | parent | prev [-] | | Thank you for the humor! I'm just suddenly slightly terrified someone's going to see this and think it's genuinely a good idea and make it part of the next popular scripting language, where lists are defined by starting commas or something :S |
|
|
|