(no title)
haakon | 1 year ago
The only unexpected thing I've found is the lack of structs/objects. Instead you only have "enums", which they call custom types, and a "struct" is implemented as an enum with one variant, seen in the article:
pub type Pokemon {
Pokemon(pokedex_number: Int, name: String)
}
I mean sure, why not, except you have to repeat the name ("Pokemon").
No comments yet.