- If
x is callable, and x’s return type is type, then x should be TitleCase.
- If
x is otherwise callable, then x should be camelCase.
Io.File.writer()'s return type is Writer, shouldn’t it be named to ‘Writer()’ here? Or am I wrong with knowledge of “callable”?
it returns an instance of a type, so it uses camelCase (which starts lowercase).
If it were to return a type itself, then it would use PascalCase (which starts UpperCase)
5 Likes
It is a callable, but it doesn’t return a type; it returns a value/instance of type Writer.
3 Likes