Nim中有没有一种方法可以为对象定义构造函数?例如我有
type Deck* = ref object cards* : array[52, Card]
我可以创建一个空的构造函数来自动创建所有卡吗?
oop nim-lang
nim-lang ×1
oop ×1