News for hackers. Stuff that matters.
Re:Almost monospaced: the perfect fonts for writing by galaxyLogic on Tuesday November 08, 2022 @12:18AM (#33516101)
In JavaScript a leading comma in an array would create a first element whose value is undefined, I believe.
Re:Almost monospaced: the perfect fonts for writing by bmn__ on Tuesday November 08, 2022 @02:18AM (#33516702)
What a stupid design. If the consortium had just one member having the competence of knowing some competing design and using his brain for five minutes, this disaster could have been avoided.

https://news.ycombinator.com/item?id=9624429

Re:Almost monospaced: the perfect fonts for writing by layer8 on Tuesday November 08, 2022 @03:33AM (#33517136)
Well, JavaScript is pretty much a lost cause anyway.
Re:Almost monospaced: the perfect fonts for writing by yowzadave on Wednesday November 09, 2022 @04:02PM (#33537780)
That's correct, but you can use a trailing comma if you prefer uniform lists:

  [
    a,
    b,
    c,
  ]
Re:Almost monospaced: the perfect fonts for writing by galaxyLogic on Friday November 11, 2022 @09:19PM (#33569351)
I simply prefer :

[ a

, b

, c

]

because, I think this is as 'uniform" as it gets. All syntactic separators are in the first column. Thus they are all uniformly in the same column. Line 1 has the syntactic separator '[' which means start-of-array. Lines 2 and 3 have ',' as the syntactic separator which means element-separator. And line 4 has the final syntactic marker which means "end of Array".

All elements of the array start at the same column, uniformly. And all syntactic separators are in the same column also uniformly.