In this story

Erlich Bachman's departure from 'Silicon Valley' is a loss, but also an opportunity as the HBO comedy approaches its fifth season.

[This contains spoilers for the fourth season of HBO's Silicon Valley.]

The idea that Silicon Valley will somehow be unable to survive the departure of co-star T.J. Miller is weird.

Or, put a different way, if Silicon Valley proves to be unable to survive the departure of T.J. Miller, it's because of the show's writers and not the absence of T.J. Miller.

Sunday night's season finale ended with Gavin Belson (Matt Ross) paying off the proprietor of an opium den to allow Miller's Erlich Bachman to remain in a drug-fueled haze for five years.

In a long, often hilarious and frequently contradictory interview with The Hollywood Reporter, Miller explained why he left the HBO comedy and rejected an offer to appear in roughly half the upcoming fifth season. The reasons include Miller's insanely busy schedule, his apparent disrespect for longtime showrunner Alec Berg and his ambivalent relationship with co-star Thomas Middleditch, whom he portrays as both "one of the funniest people of all" and something of a spotlight/dialogue hog.

Did Miller leave because he wanted a saner schedule? Because he wanted to be able to promote The Emoji Movie? Because he felt he was being insufficiently or poorly used? Because he's a generally wacky and unpredictable guy?

Dunno. The Miller exit interview reads as at least 75 percent performative, and I'm not taking any of it as gospel other than his praise for co-stars Zack Woods, Martin Starr and Kumail Nanjiani. Otherwise, it's just a guy having some fun and being silly and praising Yogi Bear.

When Miller's departure was first announced, I tweeted about it casually and received a dozen "The sky is falling!" responses saying that Silicon Valley couldn't withstand his absence.

To my mind, this would be a valid fear under two circumstances:

1) If Erlich Bachman were integral to the functional narrative of Silicon Valley. This is clearly untrue. When the show started and Middleditch's Richard was living in Bachman's startup incubator, he served a nominal role in pushing the narrative forward. For the past three seasons, though, Silicon Valley has had to perform countless resets in order to justify Bachman's presence. That's not a criticism. You're going to do things like that when you want to keep a hilarious part of the cast in place. But Pied Piper, in whatever incarnation it currently exists, doesn't need Erlich Bachman. He serves no technologic or administrative purpose, plus the actual Silicon Valley is awash in sources of capital.

2) If Miller were the show's only castmember capable of getting laughs. Should you truly believe this, why on Earth have you continued to watch this show? You could go to YouTube and find five minutes of Miller doing standup to laugh at every Sunday if you don't laugh at Jared's morose alienation or at the bickering between Dinesh and Gilfoyle. Miller was right to praise Nanjiani and Starr and also Middleditch, even if this most recent season made Richard so unappealing it became hard to laugh at him. The cast is peppered with supporting players who can also get laughs, including Josh Brener, Matt Ross, Jimmy O. Yang, Stephen Tobolowsky and Chris Diamantopoulos. Miller was not the comedy relief on Silicon Valley. He was one very funny guy on a show of very funny guys.

So let's remove that "The show can't survive his absence" idea right now. Though sure, it has that capacity.

The show's need to regularly reintegrate Bachman into the narrative wasn't the problem with Silicon Valley, but it was a piece of what for me became a growing issue in the fourth season, calcifying an ongoing issue.

Silicon Valley was terrified to move forward in any way and the show has fallen into a serious big-picture rut. It isn't a little-picture rut, because joke-for-joke, the series remains one of the funniest shows on television. In Miller's exit interview, he seems simultaneously to be raving about it and also condemning it for the repetitiveness of its looping narrative: "The gang is on the verge of huge success and then they fail dramatically, but then they snatch victory from the jaws of defeat, but then they fall on their faces again." It was impossible not to be aware of the show's repetitiveness, but this was the first season it really started to bother me.

A series that once seemed vaguely realistic when it came to the rise and fall of tech innovation made this season's big innovations basically into a MacGuffin. Richard's decentralized internet gambit was used as an excuse to keep Gavin in the story and then to justify a downward journey for Richard, culminating in the Hooli-Con malware plot and Richard very briefly losing Jared's faith and confidence. Bachman's storyline this season involved saying "Palapa" endlessly and playing a role in introducing the world to husky, bearded wild man Haley Joel Osment. I had hard laughs through much of the season, but my interest in any of the plotlines was negligible. The show has, temporarily I hope, lost the ability to make me care whether Richard succeeds or fails, which wasn't always the case.

On the surface, losing Bachman and Miller doesn't solve a problem. It just takes away a few punchlines, and on the surface that's bad.

Episodes aren't going to become three minutes shorter because Bachman isn't saying "Palapa."

This forces an opportunity — one that Silicon Valley can't afford to screw up.

When the brilliant Christopher Evan Welch died and the show had to write out Peter Gregory, the writers did a great job on one level. They honored the character's passing, occasionally remembered he had been part of the story and didn't do anything to cheapen his absence. They didn't, however, replace him very well within the narrative framework of the show.

Laurie Bream (Suzanne Cryer) has been a missed opportunity as a character. She was introduced too similarly to Gregory in her quirks, and not in a way that let the show comment on women in the tech industry in any meaningful way. The writers always kept Laurie tangential to the main story and always kept Monica (Amanda Crew) tied to Laurie, so both female characters became increasingly marginal. Monica and Laurie could be written out of the show entirely and nothing would be lost, other than any sort of representation of women in the tech industry as more than one-off girlfriends. Since Bachman was tied to the Monica/Laurie side of the story, namely the money side, writing out all three would give the show a chance to reboot and reconfigure, and it would be a mistake to do so with hollow echoes of those three characters.

That's part of why I think it would be a major error just to up Diamantopoulos' Russ Hanneman into a regular role and call it a day. Russ is great. I wouldn't have any problems at all with giving him a bigger role in the fifth season, but expanding an existing piece of the puzzle would just breed more repetitiveness.

Silicon Valley needs new voices and new dynamics, and part of that can come from responding to the show's general and ongoing diversity difficulties. That we're heading into a fifth season and the show has never had a female character who was indispensable to the larger narrative is ridiculous. That's not a PC nitpick. It's absurd to pretend that no matter how male over-represented this world might be in reality, these guys wouldn't have found an integral female foil in four years.

I don't think you can retcon Laurie and Monica into relevance, so it's probably time to start over and bring in a strong-voiced female comic in a role intended for all 10 episodes of the next season that would interact with all of the characters and actually help steer the storyline. And it doesn't need to be a "What would a female Bachman be like?" because "What would a female Peter Gregory be like?" proved to be a limited play. It's not "Hey, add a woman" but "Hey, you've got to add new characters, why not add a woman you have more use for than poor, poor useless Monica?"

And let's not add a character who replicates Bachman's relationship with Jian-Yang. Let's make Jian-Yang into an actual character who doesn't require Bachman's presence to be in scenes and be funny. Jian-Yang isn't like Monica and Laurie, where the writers have established repeatedly they don't quite have enough ideas to make them worthwhile regulars. They've barely tried anything when it comes to giving Jian-Yang a backstory, motivations or ideas of his own.

I don't know if Jian-Yang is funny with people who aren't Bachman because the writers found a rut they loved and stuck with it. If they have no new ideas for Jian-Yang and how he might relate to the Pied Piper team without Bachman around, it's time to boot that character and add more new blood. But I'd much rather be shocked to discover that when he isn't yelling at Bachman and being derided for his limited English (and coming up with stealthily useful apps), Jian-Yang has a rich interior life and is full of surprises and humanity.

Losing Miller hurts Silicon Valley. Sure it does. It won't be funny in the exact same way again. But this is a show that did "funny in the exact same way" for as long as it could.

Losing Miller potentially helps Silicon Valley because it forces the writers to try new things, to try new characters and to push stories in directions that Bachman was keeping stories from going. The show has good writers, some of the best, and if they treat this departure as an opportunity to introduce new characters and unfamiliar stories, it's really the best thing that could happen to the show. The show could become more diverse, more representative of its setting and could use its prism to look at new things within the tech bubble.

Or maybe the writers just make Russ Hanneman a regular and have Russ and Jian-Yang become the new Bachman/Jian-Yang. Maybe they don't take the inspiration to change the energy and just leave Monica and Laurie in a dull limbo and do another season of the identical Pied Piper roller coaster. And maybe that works! Maybe they introduce one new character and he's a white guy and he just happens to be hilarious and that's great. It could happen! But if the show suffers ... the suffering isn't stemming from Miller's loss. It's suffering from creative fatigue.