Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Can* is not a good name for a class. Quote from MSDN: "Do name classes, interfaces, and value types with nouns, noun phrases, or occasionally adjective phrases, using Pascal casing", link: msdn.microsoft.com/en-us/library/ms229040.aspx Good name for class would be Document, acceptable name would be Printable. Commented Jan 25, 2012 at 23:59
  • One example in the Scala language is the CanBuildFrom. This would be an adjective phrase. The use-case of this class is very different than that of other classes. Instances of this class are almost never constructed nor resolved by the client - rather, they are available in the scope for certain types. If they are available for a certain type, then methods involving that type which are marked to require this typeclass can be called. This exists to offer an extensibility mechanism more flexible than subtyping. See scala-lang.org/node/114. Commented Jan 26, 2012 at 9:17
  • I only recall using adjective phrases for mock classes implementing interfaces for unit tests - since they had no real role. Commented Jan 26, 2012 at 9:45