Written Language Metaphor

Language metaphors refer to the application of constructs developed from human languages (i.e. linguistics) into the programming language landscape. Since so many languages depend on non-verbal punctuation of some sort, we can more specifically, talk about applying written-language metaphors.

Firstly: A part of general CodingStyle suggests putting a human-readable name to every conceptual unit. This begins with variable names, and scales upwards to functions -> classes/structs/objects -> modules/files-> programs. There are probably only a few exceptions, like general index variables and lambda functions, where this rule can be broken, unless you're writing code that will never be used again.

Secondly, use the semantic categories to aid in naming objects (which helps every reader of the code):

In addition to using these linguistic concepts, I support the use of punctuation for being clearer than having none:


CategoryCodingIssues


EditText of this page (last edited February 17, 2014) or FindPage with title or text search