We've spent a lot of time talking about the right casing convention for Roc (#ideas > snake_case instead of camelCase), and of the popular naming conventions for variables, we agreed that snake_case is the more readable of the naming conventions compared to camelCase. However, during that discussion there we had a few people mention that they would actually prefer kebab-case if it were a choice. Similar discussions on Reddit between camelCase and snake_case see popularity for kebab-case even without it being offered as an option. Even though we've just sunk a lot of work into the snake_case conversion, I think now is maybe our last opportunity to consider switching to kebab-case before Roc users get annoyed by the shifting sands after experiencing stability later this year.
Pros for kebab-case:
reused-var_ is more easy to find in scanning than reused_var_. The ! for purity inference makes scanning, not just reading, very easy, and more features like that would be niceCons for kebab-case:
I think if we ignore the historical precendence here, kebab-case is the better choice, but I might be overly optimistic that the effect on negation is mitigable with good error messages.
Also, even though I listed more pros than cons, I would agree that the two cons are both pretty big deals.
seems like it's a big weirdness budget cost and the only benefit would be maybe some people having it as an aesthetic preference? :thinking:
holding shift seems like a really minor benefit haha
same with reassigning, and it's arguably a drawback because foo-bar_ looks like a mistake :sweat_smile:
I think I lean more towards snake_case as well, but I try to be conscious of liking anything that Rust does because I generally like Rust already
I mainly just think it's good to make sure we've had this discussion before too late
Not on my computer right now, but the first thing that comes to my mind is, that you cannot select the whole word in one go. E.g.: With snake_case and camelCase I can select the whole thing by double clicking, or using the keyboard with Shift-Option-Left/Right etc.
kebab-case breaks that completely. I am obviously not a vim user, so maybe the experience is different for its users. But for me personally the change to kebab-case would completely go against what has been stored in muscle memory for 15+ years.
And just from a very subjective view, kebab-case looks and feels just wrong to me.
I personally love kebab-case (one of the LISPisms that I loved), probably from years of writing too much CSS. But I think for a PL looking to be mainstream it's not a good idea - even if I think reducing the amount of shift holding / chording needed is actually a very big deal for those that suffer from RSI
I'm so used to always programming with a symbols layer that they both are equally easy to type. Some reason I thought kebab case required shifting and snake case did not......lol.
Anyway, I think snake is reasonable and kebab doesn't really have any major gains on it.
I do like kebab case aesthetically and with it being slightly easier to type, but not being able to select full words as easily is a dealbreaker for me. I am frequently annoyed by any text that is kebab case because I can't double click it to select.
Kinda funny how some archaic technology decision on word boundaries hurts kebab case so much.
As the person who first mentioned kebab-case in that previous discussion, I personally think it's probably not right for Roc. My example was Pyret, but Pyret is intended as a first programming language for new programmers, and it was explicitly created only for educational purposes. So Pyret doesn't have to worry nearly as much as Roc does about the strangeness budget. I agree with others that the difference between snake_case and kebab-case is very minor.
(It's funny because I haven't been keeping up with Roc development much for over a year, but I happened to look today and saw an idea that I had brought up!)
Last updated: Jun 16 2026 at 16:19 UTC