4 ms·
Fair play - but as far as "missing comma" syndrome goes CS still has its problems. e.g. consider an array of objects: [ a: 1 b: 2 , a: 3 b:
by shaunxcode 15y ago
Fair play - but as far as "missing comma" syndrome goes CS still has its problems. e.g. consider an array of objects:
[
a: 1
b: 2
,
a: 3
b: 4
]
If you forget that "," which MUST be dedented a level - you are hosed.
This becomes uglier w/ nested objects
[
age: 30
aliases: [
first: "peter"
last: "jensen"
,
first: "walter"
last: "gregor"
]
,
age: 20
aliases: [
first: "tony"
last: "foulard"
,
first: "sam"
last: "jakob"
]
]
I think I almost prefer:
[
{
a: 1
b: 2
}{
a: 3
b: 4
}
]
[
{
age: 30
aliases: [{
first: "peter"
last: "jensen"
}{
first: "walter"
last: "gregor"
}]
}{
age: 20
aliases: [{
first: "tony"
last: "foulard"
}{
first: "sam"
last: "jakob"
}]
}
]