type
Person = ref object of RootObj
name*: string # the * means that `name` is accessible from other modules
age*: int # no * means that the field is hidden from other modules
ValidPerson = concept x
x.name.isEmptyOrNil() == false
x.age >= 0
proc printPerson(person: ValidPerson) =
echo person.name
echo person.age
var a = Person(name: "bob", age: 5)
var b = Person(name: "", age: 5)
var c = Person(name: "bob", age: -1)
echo (a is ValidPerson)
echo (b is ValidPerson)
echo (c is ValidPerson)
#printPerson(a)
#printPerson(b)
#printPerson(c)