...
Here's an example of accessing variables in the following languages:
| Objective-C | Java | Scala | |||
---|---|---|---|---|---|---|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9175aa98-b432-4328-9108-796b4a07aad2"><ac:plain-text-body><![CDATA[ | getter | | |
| ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac: |
setter | | |
| ]]></ac:plain-text-body></ac:structured-macro>
Of course in Java, we may generate WebObjects classes with "get" methods as well in order to stick to convention.
In scala there is an additional convenience we may use to produce "get" and "set" methods in addition to the default Scala accessors - Scala Annotations.
...