Hmm. #Prolog and #Mercury require variable names start with uppercase. Otherwise they would be mistaken for predicates (or functions).

Camel case and snake case - Rosetta Code rosettacode.org/wiki/Camel_cas

I am very much in favor of what I just learnt is ‘snake case’, but nevertheless often use whatever the convention is. (Unfortunately, Standard ML is a camel case language, or I’d like it more. And some other languages won’t let you use underscores, for heck’s sake.)

Follow

@chemoelectric prolog variable names can be all lower case if prefixed with an underscore.

@tetrislife Can a predicate’s name start with an underscore, then?

@tetrislife My favorite is actually Scheme, where you can stick almost anything in a name, and the convention is the-lisp-way-of-naming-things.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.