The Switch is such a weird stopgap that it doesn’t feel like it fits in either generation IMO. For the sake of grouping, I’d keep it along in the past generation just because it’s technically quite old hardware, by this point.
On the other hand, the Switch still has a long way to go in its life, so we’ll be seeing it side by side with the new gen. It’s a weird, yet fun question!
So, just what defines a generation? Is it the CPU? The controllers? The graphics? I'm under the impression that there are varying factors that are shared between consoles from a specific generation, but if Switch is in the Eighth, then it seems to me that something other than what I assumed puts it in that generation.
I always go by release date and internal hardware. Really, just like human birth generations, it’s something people never can agree on. We all have our different metrics.