There is a lot of specialization in exercise classes. Sometimes the specialization is in what effect one wants: cardio for strengthening the heart, weight training for strengthening the musculoskeletal system, core for, well, the core, and so on. Sometimes it is in style: zumba and spin both are cardiovascular (though of course with strengthening and sculpting effects), but quite different in style. Sometimes it is in target population: zumba gold targets an older exerciser, as does fit for life, though the music and movements will be different. And lots of classes are based on specific needs of a target audience: children, teens, developmentally disabled, breast cancer survivors, those in wheel chairs, etc. Teachers are always stretching their creativity, and offering 'branded' workouts with unique slants.
In yoga you see the same thing. Of course, in yoga 'brands' are 'lineages', many of which have stood the test of decades: think Iyengar, or Kripalu. There are choices of heated or non heated, vinyasa or non vinyasa, yin or non yin. Chair yoga is popular, as is yoga specifically designed for children, or teens, or any of the same categories you might make any physical movement class to reach. After all, the shared variable is the human form, and a shared variety of human experiences.
Is it better to take a specialized class, or to take a general one?
My students will laugh now, as my answer will be, as it usually is, 'It depends'. Generally speaking, I would say that they are not mutually exclusive, and that you will get something out of both.
Why take a specialized class?
If one is generally health and of reasonable fitness, and lives in an area with many available classes, and is financially able to take classes without hardship, specialized classes can offer depth and variety. Some people will find they gravitate toward a super hot environment, or a flow class, or lots of inversions, or whatever it is. I would suggest if possible take some time to try different styles and studios and teachers. Remember there is as much variation between teachers as there is between styles. And if in the end it is clear a particular style is right, one will have chosen with the knowledge that they have tried other paths and this one works. For this person the specialized class offers the opportunity to dig deep within a particular lineage or style.
In terms of classes developed for people of a certain age or condition, there are also benefits. I trained in a style called 'Mega Yoga' developed for larger bodied people. There are some specific techniques for moving flesh folds to allow depth of movement without loss of breath, or ways of supporting the body to alleviate stress on knee joints, for example. In a general class these specific techniqes are difficult to present in depth for one or tow people. And there is the camraderie is see in the senior center classes I sometimes teach. To be with a group of people who have shared experiences, and who may have similar needs (like too loud music makes it hard to pay attention to the teacher speaking) can both increase the sense of belonging, and enhance the learning experience. The same is true with pregnancy classes. There are issues that can be discussed at length in a class with a group for whom those issues are currently relevant and interesting.
Actually, just as much as a group class, I think a person can learn a lot by doing some individual work with a teacher or trainer. This is again, not instead of, but in addition to. Even if there are no injuries, or conditions, or needs.... every person is like a blank book in which a unique story is being written. Having someone read it with you can sometimes provide insight that can deepen your own understanding of what you will be writing your whole life.
So what is the point of the general class? Is it just for the reasonably fit person in middle life, with no other needs? Actually I think everyone in a multi level class benefits when the class level varies.
First, for the person who does not have special concerns, having others in the class who do offers the opportunity to try the 'path less travelled'. If I as a teacher show someone a different way to hold the shoulders, or a new way to take a spinal twist because a student has a limitation or condition making the way I would usually teach it difficult, everyone in the class can see and try it. This happened last week, and I found half the class using the modification, and could see them looking at each other with 'wow, this is really great' all over their faces. Without the person with the need, we probably would not have gone in that direction.
Second, for all of us it offers the opportunity to learn about, support, and connect to those who are not mirrors of ourselves. I see no reason why the only people who would be expected to be supportive of someone who is in some specific group. Karma yoga teaches us that, as Marley's ghost said in A Christmas Carol “Mankind was my business”. The lines of energy in yoga run deep into self understanding and self study, but equally far out into our world.
Third, for those with a specific need, it can be a great way to practice self study. When I was a couple of weeks post partum from first son, a yoga event occurred for which I had waited over a year. Beryl Birch came to our area for a workshop. I knew I would not be doing all that I could at my prime. Being able to be with a group and not do everything, and listen and modify, and pull back when necessary is not always easy. The breathtaking beauty of her practice made me want to fly. But it provided a chance to practice something even more difficult for an (then, more so) athletic person surrounded by her peers.... letting go of fear of judgement, letting go of self judgement, and being in the moment.
Every time I step on the mat to teach I have such a sense of gratitude for my students. I know there are those with scars on their hearts, and scars on their knees, everyone so different, and each so interesting, and wonderful. In the end, what practice you choose matters, in that it provides a path, but also does not matter, as it is the accepting of the practice that makes the difference. If Krishnamurti is right that truth is a pathless land, what really matters is getting up and going, not the how you do it.