|
|
|
|
|
by narimiran
2422 days ago
|
|
> In many languages, you might use one for a type name, the other for a variable. And Nim is one of those languages too. This is perfectly valid and frequently used: type
Person = object
name: string
age: int
let person = Person(name: "you", age: 99)
echo person
You can try it in Nim Playground: https://play.nim-lang.org/#ix=20jS |
|