Appendix: Coding standard for the code samples
The programming language used for the code samples in this book is a generalized object-oriented programming language. Its syntax is a mix of PHP and Java. It has the following properties:
- It’s strictly typed. Parameters and return values need explicit return types:
public function foo(Bar bar): Baz { // returns an instance of `Baz` }
- Parameters, properties, and return types can allow for null as a value by adding a question mark at the end:
public function foo(Bar? bar): Baz? { // allow in instance of `Bar`, or `null` // returns an instance of `Baz`, or `null` }
- If you don’t add a question mark after a parameter or return value’s type, null will not be an accepted value for it:
public ...
Get Object Design Style Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.