An alternative to the constructor pattern, by @laconbass