I’m trying to wrap my head around the optional parentheses.
from PDF page 60-63
new Tribble if @isAlive tribble1 = new Tribble showArea new Square(2) throw new Error('Invalid starship captain')
Just curious if there was a convention to follow, as it appears that you wrap constructor params with parens.
I tested (successfully) the following:
showArea new Circle 4 throw new Error 'showArea requires a Shape instance!'
…but is this frowned upon?
You seem to be consistent in wrapping constructor params in parens; whereas, if no params are passed, sometimes you have parens (e.g., @new Raven()@) and sometimes not.