this post was submitted on 10 Feb 2024
223 points (99.6% liked)

196

16822 readers
610 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

If you have any questions, feel free to contact us on our matrix channel.

founded 2 years ago
MODERATORS
223
Antimemes rule (lemmy.dbzer0.com)
submitted 1 year ago* (last edited 1 year ago) by moosetwin@lemmy.dbzer0.com to c/196@lemmy.blahaj.zone
 
you are viewing a single comment's thread
view the rest of the comments
[–] azertyfun@sh.itjust.works 6 points 1 year ago

Every C-inspired language with curly braces (which is a lot of them) that I know uses some variation on K&R/Allman.
Golang straight up enforces the "K&R" style and doesn't recognize a curly brace on a new line. I don't know of a JSON prettifier that doesn't use "K&R" style either.

Unless you mean that the Haskell/Lisp styles make more sense in Haskell/Lisp, which, yeah, obviously. Hopefully no-one actually writes C code like that.