Settings

Theme

Why I like snake_case

graybeard.ing

2 points by rglover 10 days ago · 5 comments

Reader

efortis 10 days ago

My workaround was a editing a font with a much longer space char and with a 1/3 of a space of left padding on uppercase letters.

https://github.com/ericfortis/verdanacamel

The problem is that it looses tabular alignment, so I wrote an IDE plugin for tabularizing some blocks.

https://github.com/ericfortis/tabular-eye

---

Similar to my font, emacs has a plugin that adds a little underscore.

https://codelearn.me/2025/02/24/emacs-glasses-mode.html

mac3n 10 days ago

I've always disliked snake-case. Maybe it's because the teletype backarrow would have been a more useful character than underscore, but it got replaced by underscore sometime in the 1960s.

vunderba 10 days ago

I’m partial to SCREAMING_SNAKE_CASE mostly because it makes me giggle when I picture it.

Ukv 10 days ago

I do like snake_case but a lot of this feels a bit circular, effectively just saying that it's good because it's already used by the author's code and things it interacts with.

I'd like kebab-case even more if it weren't for the annoying detail that `-` is also subtraction.

  • rgloverOP 10 days ago

    That's why I made the point about consistency mattering more than taste/style here. My personal preference is toward snake_case, but if your own preference is kebab-case, as long as you're consistent, great.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection