Named constructors
Per Nordlöw
per.nordlow at gmail.com
Thu Dec 12 07:58:09 UTC 2024
On Thursday, 12 December 2024 at 07:55:14 UTC, Per Nordlöw wrote:
> On Saturday, 9 November 2024 at 00:02:52 UTC, JN wrote:
>> Let's say you want to have an Angle class, which holds radians
>> internally but can be initialized with degrees or radians.
1. Note however that when you already have written `Radians` and
`Degrees` and their mutual conversion there's no need to write
`Angle`.
2. Some would argue that it's better to use the singular forms
`Radian` and `Degree` instead.
More information about the dip.ideas
mailing list