Your own types
A player has a name and points, and points must never go below zero. A class bundles data with the methods that guard it, and a record models plain data in a single line.
A player has a name and points, and points must never go below zero. A class bundles data with the methods that guard it, and a record models plain data in a single line.