veekun / pokedex

more than you ever wanted to know about Pokémon
MIT License
1.44k stars 637 forks source link

[Suggestion] Remove hypens in Pokemon identifiers that are not forms #188

Closed route1rodent closed 7 years ago

route1rodent commented 7 years ago

Hello, I don't know if this is a breaking change or not for other things, but would be nice if there is a more consistent naming pattern for identifiers, like only using hypens when what's behind it is a form name, like diancie-mega, but not using them for example for species names like ho-oh (that will be hooh).

This way we can easily extract the form part of the identifiers, without having to consult extra columns / queries and we'll also have a more consistent naming.

What I am suggesting is to remove the hypen from these Pokemon: nidoran-m, nidoran-f, mr-mime, ho-oh, mime-jr and porygon-z, like I did in a project based on this one.

What do you think?

farbodsz commented 7 years ago

I'm not too familiar with the whole veekun project, but would it matter? The form names and Pokémon names are in different CSV files, using the IDs as a foreign key. I'm not sure whether the identifiers are actually used in this way, although I do like the idea of a consistent naming system.

eevee commented 7 years ago

Identifiers are opaque. It would be nice to be a little more consistent here, but you shouldn't be parsing them at all.

magical commented 7 years ago

Thanks for the suggestion, but i don't see us doing this. To add on to what Farbod and eevee have said, the primary purpose of the identifiers is to be a human-readable id. They exist to make the tables nicer to read, but also so that programs can compare with the identifier instead of the id, making the programs nicer to read. For this second use-case, it is important that the identifiers be stable. We don't want to go changing them willy-nilly. There is already a supported way to get the form identifier: join with pokemon_forms and select the form_identifier field.