News for hackers. Stuff that matters.
Re:Formatting code should be unnecessary by rapind on Monday September 08, 2025 @06:59AM (#45166819)
Let this sink in though:

    [ 'apple'
    , 'banana'
    , 'orange'
    ]
Re:Formatting code should be unnecessary by JBiserkov on Monday September 08, 2025 @07:43AM (#45167106)
In Clojure, commas are treated as whitespace and are thus completely optional.
Re:Formatting code should be unnecessary by maest on Monday September 08, 2025 @07:05AM (#45166855)
That makes prepending an element a special case.
Re:Formatting code should be unnecessary by ParetoOptimal on Monday September 08, 2025 @12:19PM (#45170176)
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.
Re:Formatting code should be unnecessary by 3pt14159 on Monday September 08, 2025 @01:15PM (#45170940)
I don't really know why we even need commas for lists of things. Just use the white space.
Re:Formatting code should be unnecessary by bogomog on Monday September 08, 2025 @05:51PM (#45174503)
I find it jarring compared to commas after the words, making the commas unnecessarily prominent.
Re:Formatting code should be unnecessary by Nevermark on Monday September 08, 2025 @07:25AM (#45166981)
This is so clearly superior. Delimiters are prefixes.

But the scale of technical debt this insight has revealed is depressing.

Re:Formatting code should be unnecessary by citizenkeen on Monday September 08, 2025 @07:33AM (#45167023)
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.
Re:Formatting code should be unnecessary by Nevermark on Monday September 08, 2025 @07:46AM (#45167133)
I just reverse the sort order when that case happens.
Re:Formatting code should be unnecessary by setr on Monday September 08, 2025 @07:37AM (#45167059)
The only correct syntax/format

    [
      , a
      , b
      , c
    ]
If only there existed a language designer intelligent enough to support it
Re:Formatting code should be unnecessary by maccard on Monday September 08, 2025 @08:29AM (#45167466)
You want yaml

    key:
      - a
      - b
      - c
Re:Formatting code should be unnecessary by crazygringo on Monday September 08, 2025 @09:58AM (#45168348)
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

Re:Formatting code should be unnecessary by MonkeyClub on Monday September 08, 2025 @02:39PM (#45172084)
Lisp:

  (
    a
    b
    c
  )