miniblog.

← Back to all posts
23
I'm never sure how to convert words with hyphens into SCREAMING_SNAKE_CASE. For example, should built-in function be BUILT_IN_FUNCTION or BUILTIN_FUNCTION?

3 Comments

@wilfredh The one that gets me is “set up” and “setup”. Like maybe setupFunction would be like a function that sets something up whereas setUpFunction could be a function that sets up another function (ie, one is a noun and the other is an imperative verb). But I think most people just always write setup as one word in identifiers even when it’s a verb and it makes me sad
@bpeel Oof, language changes I guess. E-mail became email at some point too. I also struggle to choose between HttpRequest and HTTPRequest. The former is easier to read (clear word boundaries) but HTTP just looks more correct to me.
@wilfredh bUILTiNfUNCTION, of course