-
Notifications
You must be signed in to change notification settings - Fork 1
2.2 Coding conventions
NinaMohnke edited this page Aug 3, 2022
·
11 revisions
- We use accessors (getters and setters) to access instance variables instead of direct random access
- There is a point at the end of each method
- There is no point at the end of a block
"[xxx]"
instead of"[xxx.]"
- All variables are named in lowerCamelCase ->
aFancyVariable
- All comparison operators
(ifTrue, ifFalse, ifNil)
stand in a separate line - There is no space between method name and method code
- There is space between local variables and method code
- Blocks with local variables have their expression starting on the next line
- Blocks with local variables have their local variables decleration between white spaces
- Cascades have their receiver on a single line above all messages
- Messages in return over 2 lines are indented with an additional indentation