Express What, not How.
Alex Shinn
foof at synthcode.com
Thu Oct 16 22:10:06 EDT 2003
More information about the Python-list mailing list
Thu Oct 16 22:10:06 EDT 2003
- Previous message (by thread): Express What, not How.
- Next message (by thread): Express What, not How.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At Fri, 17 Oct 2003 00:54:53 GMT, Raffael Cavallaro wrote: > Naming is a fundamental step in building abstraction. [...] This is, > after all, how people have been communicating abstractions since the > dawn of spoken language. Language may have begun with proper names, but these are by definition *not* abstract. Abstraction comes from being able to combine different linguistic elements to build more complex ideas without needing to give them names. We use adjectives and adverbs to modify existing words without needing to come up with new words, and build further with noun clauses and prepositions. So you can both "run quickly" and "swim quickly," which is analogous to a higher order function (quickly) working on two existing functions (run and swim). You could give specific names to either of these but indiscriminately naming puts a burden on the memory. In this case, the further modified function "run quickly over a short distance" is a common enough concept that it does get its own name "sprint," but there is no equivalent for when those two modifiers are applied to "swim." It may be fun to suggest that "swint" be used, but I don't think anyone would argue that would make the language more clear, quite the contrary it would make the spoken language unwieldy. Naming is of course important, but we'd have a very difficult time communicating if we had to name everything we wanted to talk about. You need to choose a good balance of what deserves a name. And don't name the farm animals, it only makes it harder when you eat them :) -- Alex
- Previous message (by thread): Express What, not How.
- Next message (by thread): Express What, not How.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list