So, as some people may be aware, Bioware has recently apologized for their presentation of Hainly, a transgender character from Mass Effect: Andromeda. Some people have attacked the character and her dialogue for being a badly written character with bad dialogue. Regarding this, however, there's something that I think needs to be explained (and, to be fair, this isn't obvious unless you've spent a few years writing fiction at a professional level) - it actually wasn't bad writing. To explain why, well, it's basically "Speculative Fiction Dialogue 101."
Most dialogue in speculative fiction is naturalistic, but not natural. It aims to feel real, but for a number of reasons it can't actually reflect the reality of two people having a conversation in certain circumstances. The reason for this is that there is always an unseen third party in the conversation who has to understand it (or, if the story at that point requires it, NOT understand it): the reader/viewer/player.
Consider for a moment how much information is left unsaid in any given real-world conversation. We don't reiterate the stuff we already know. If two people have been friends for ten years, nobody reminds the other of that - they both already know. The reader/viewer/player, however, doesn't. The issue is how to convey this information in a way that doesn't feel clumsy or ruin immersion.
Dialogue is a good way of doing this, if you're careful. So, you could have a character say, "I've known you for ten years, and..." - it feels like something somebody COULD say (even though it actually isn't), but it's still a bit clumsy, and that makes it passable rather than good. A better thing would be to have the character say, "In the ten years I've known you, you've always..." - that flows better while still conveying the information. Again, though, nobody actually talks this way - it's dropping information that both characters already know, but the reader/viewer/player doesn't.
Or, put another way, to get best results you're passing the information to the reader/viewer/player under the table such that it is received and understood, but they aren't really aware that it is being passed at all.
That's character building - world building can be even trickier. If you're writing something set in the here and now, you've got a number of shortcuts that allow you to skip part of this, because all of the assumptions the reader/viewer/player will make about how things work will hold true in the story. But, if you're building a fantasy or science fiction world, it doesn't - and as a rule, a reader/viewer/player will assume that somethings works as it does in the here and now unless they are told otherwise.
So, how do you do this? Taking an example from my story For the Digital Green Fields of Aldamar, you've got a story about MMOs being used as a tool of totalitarian social control. This means that what we would interpret today as online addiction is the norm in this particular future world. To pass this information along, I used a third character in the opening scene. So, there were two characters (Dave and Skazz), each of whom is taking a different position (being online all the time is good for Dave, being online all the time is bad for Skazz) - then, the third character, Terry, expresses surprise at SKAZZ. This conveys to the reader that the online addiction behavior is normal using nothing more than dialogue - and in the story, Terry only exists to deliver that dialogue. When the butchered version went through editing, Terry was removed, and this caused serious problems in the entire story - to fix it I had to add a line in Dave's thoughts about how what Skazz said was abnormal, but because it was coming from the character who already had been established to be an online addict, it didn't have nearly the impact of having Terry in the scene to express surpise.
Turning this to Hainly in ME:A, the writers have to accomplish two things: 1. Establish her character and backstory QUICKLY (after all, she's a minor NPC, so she's not getting a lot of time for character development); 2. Establish how transgendered people are seen and treated in this future world.
And, that's what her dialogue does. She drops the fact that she's gone through the transition as a piece of trivia as part of her backstory, and it does play into the "getting a fresh start" idea that she's talking about, so it is something that somebody could conceivably say. Ryder reacts to it as though it is trivia, but this only sets up Ryder's reaction - the third parties are the people standing around, who do not react to this at all. So, Hainly treats it as trivia, Ryder treats it as trivia, and all of the third parties treat it as trivia. As a result, the viewer/player becomes aware that being transgender is not a big deal in this future world, without clubbing them over the head with the information.
Here's where it gets tricky (as though it wasn't already) - as somebody who (as I mention in my article) comes from a family and non-visible minority that has fought its battle for acceptance and come out the other side, this conversation rang true to me. I've had variations of this conversation, where I mentioned my Judaism (which two generations before would have been intensely personal and a guarded secret) as a piece of trivia that was relevant to the topic at hand. So, even if this is something that feels inconceivable now, it would probably ring true to a transgender person 50 years from now, who grew up in a world where being transgendered is just a piece of personal trivia.
But, as so many comments suggest, it clearly did not ring true to transgendered people in the here and now. And there was a big mistake made: the "deadnaming," which somebody who is not part of the transgender community would easily be unaware of, and that caused clear problems. But, again, this makes it flawed writing, but not bad writing. The information that needed to be conveyed was conveyed without relying on an infodump (such as "As you are no doubt aware, back in my grandfather's day transgender people like me were treated..."), it is used as a relevant answer to a question that Ryder asked ("Why are you out here?" "Well, back home I didn't feel like I was who I should be or was doing what I should be, so I changed myself and came out here."), and for most people the dialogue probably worked. So, the writing is passable.
Which leads us to the next tricky question: what would have made it good?
And make no mistake, this IS tricky. In this format you can't use Hainly as a point of view character and just write about some moment she remembered back before her transition. So, dialogue is all you've really got. You can adjust it to resonate with the modern day transgender community, as Bioware has stated they are doing, but this then leads viewers/players with the understanding that what it is to be a transgendered person in the ME:A future is what it means now, as there is no worldbuilding that suggests otherwise. And, you can only go so far in what Hainly says to fill in the gaps - if she says "You know, back in my grandfather's day, transgendered people were..." it won't feel connected to the conversation, and will end up a badly written infodump (and the same would hold true if Ryder said, "Wasn't it true that back in our grandfathers' day, transgendered people were..."). Also, you can't have Hainly refer to being a man in a past incident before her transition, because it wouldn't feel right to have her say, "Back when I was a man, I saw..." because her sex at the time would be irrelevant to the memory - it would not feel like a piece of information she would volunteer alongside her account of the incident.
(And, again, speculative fiction dialogue is all about what FEELS like something somebody would say - a lot of times, it's conveying information that nobody would never feel the need to say aloud. So, the trick is to strike a balance between what the reader/viewer would THINK somebody might say while putting words into a character's dialogue that they wouldn't actually say.)
If I was doing it, I'd probably give Hainly an additional line that was something like, "I know it's a bit extreme, but I wanted a complete fresh start - after all, if you're going to do something, why do it by half measures...and who could resist a new galaxy to explore?" This would feel like something she would say, convey that she didn't feel the need to move to a new galaxy just to change her sex (which is something people got out of it), and add some additional characterization (an adventurous spirit, etc.). But other than also removing the deadnaming, I don't think I'd do much more than that - it is a really delicate balance, and the minute something feels too far off from what somebody would say in real life, the immersion for the reader/viewer/player is shattered.
So, that's why it's not bad writing. It could be better, and it did make a big mistake that destroyed immersion for transgendered people, but it actually WAS passable for what needed to be conveyed.