. As to whether they were "better" implemented I guess that would be determined by whether you thought the 4e roles were or were not always there. IMO the Defender fighter was much more restricted as well as generally worse than his less focused and more versatile brethren in 5e...
I've already demonstrated the straight jacket that this role enforcement placed on the fighter when it came to ranged combat
The traditional role of the D&D fighter since the early days was the tank or fighter wall who stood at the front of the party and traded melee damage while the cleric immediately behind him healed him, the wizard cast spells and the thief bled in the corner because he failed to surprise the monster.
Those traditional roles weren't exactly perfect. That the fighter could be a mediocre archer (or a good one, with double-specialization, later), didn't make him a better tank or a better class, just a less-focused one.
Well I think the issue I have with the design of the ranger being "the" archery class was... why does the Ranger get to be effective at both melee and ranged combat (along with more skills) but the supposed master of combat is almost totally ineffective in a fight that went ranged... like really... you're the combat class and all it takes is climbing or flying to neutralize you? That seems absurd in a world with the creatures of D&D...
Every class got to be basically effective in both melee and range - perhaps at the cost of a single feat or carrying the odd secondary weapon. The fighter, for instance, could use heavy thrown weapons perfectly effectively, and his core feature, Combat Challenge did technically work with them. Melee training made most classes able to do something in melee. It's actually one of the less baseless (if not very cogent) complaints about 4e that it was too 'easy' on PCs by allowing most of them to be at least somewhat effective in most situations, rather than having a more rock/papers/scissors/lizard/Spock kinda thing going, in which some or most of the party is sitting out many challenges.
The question isn't really does the fighter cover more concepts in one edition than another, but whether the edition covers more concepts (or, specifically, the concept you want) and does so well, not just for you, but for everyone at the table. The traditional - and 5e - fighter handle a fighter-wall tank well enough, and the 5e fighter can be an acceptable high-damage archer, outside of the earliest incarnations, the fighter also made an appallingly good TWFing quisinart of doom. OTOH, they fail when it comes to defending allies outside of narrow corridors and doorways, being party leaders or having anything much to do outside of combat. Look at 4e, and you can have an excellent defender, even when not given a convenient choke point, a killer archer with a lot of in-combat and out-of-combat options, a TWFing death-machine, and a capable battle-leader who contributes to the party meaningfully in mechanical ways. But you're looking at 3 distinct, balanced, fully-realized classes. There are simply more playable martial classes than in other editions, so each class can be devoted to a single role. And, since they use a common class structure, there isn't a huge barrier to entry when it comes to learning a new class, so your choice isn't constricted in that sense either.
There's no 'straightjacket' in this analysis - except the one you wear in your mind when you can't grasp the fact that the 4e archer needn't be of the fighter class.
But, that was in the brief period when roles were formalized, and class design was even-handed enough to let martial classes handle several of them.
5e, to get back to the original question is different. It doesn't have formal roles, just the informal traditional roles epitomized by the old-school Fighter, Cleric, Magic-user & Thief. So if a class fails to fill a traditional role, or fails to contribute adequately to the party, it can be put off to having it's own 'unique' role, and the campaign or party or player not being suited to that role. It's a reality, or at least an attitude, that lowers the bar for class design considerably. Which can be seen as a way of opening up 'design space' and leaving creativity unrestricted. Afterall, the DM can clean up any resulting balance or playability issues to whatever degree his group feels the need for.
EDIT: I would also cite this as one of those differences between designing with a role in mind vs. designing with the class in mind
Indeed. Design of classes in 4e initially took a 'grid filling' approach in which each class existed at the intersection of a Source with each of the Roles. Thus the class is designed with the nature of his abilities, Source - general concept like warrior (martial) or mage (arcane) for instance - and how those abilities will be used to contribute to the party in combat, Role in mind.
While I don't think role was ever discounted - magic-users for instance, were originally thought of as playing a combat role similar to artillery in wargames - it does seem like the traditional roles more or less evolved, while the concept of Class - more like that of Source, alone, in 4e - really drove the design, without contribution or other aspects of balance much taken into consideration, initially.
No one should be assigned a role. Everyone should be able to play their own role. That is role-playing.
Players aren't assigned roles in any version of D&D. Classes are. In most versions of the game a player who was committed to a certain concept might be limited in his choice of role, based on the classes that fit his concept.
For instance, a player who didn't want to play a caster in 4.0 (leaving the ambiguous Essentials Hunter out of it), but wanted to play a warrior of some sort, would be unable to choose the Controller role. He might get close with an archery Ranger or Brawling Fighter, but he'd primarily be a Striker or Defender, respectively. That's an unfortunate limitation on the player's choice based on the concept he wanted to play. Conversely, if he wanted to play a pious character, he could take up any of the 4 roles (Defender

aladin, Leader:Cleric, Striker:Avenger, or Controller:Invoker).
Similarly, in 5e, if a character wanted to play a non-magical warrior-type as anything but a high-damage 'striker'-like role in combat, he's out of luck: the non-magical fighter, rogue, and barbarian archetypes are all fit pretty firmly in that category. But, if he wants to play a mage, he can be a stand-up tough-guy mage (Eldritch Knight), sneaky charlatan mage (Arcane Trickster), a healing 'leader'-ish mage (Bard), a blasting Sorcerer or Warlock or Invoker or a subtler school of Wizardry or more 'controller' take on those other arcane classes.
The devil is in the details. In earlier editions archery was viable at lower levels without huge investment, but paled in comparison to melee at higher levels if strengthbows weren't allowed (often the case) and/or archery specialisation, and there was the need for magic bows and arrows, and in some editions special metals. Archers who didn't specialise and equip themselves adequately were subpar as levels rose. Giving players the illusion that a particular option was viable when in practice it wasn't happened far too much in previous editions.
There has been a lot of that in a lot of classes throughout D&D's history. Some of it's intended: a player-chosen option can be set up to be attractive, conceptually, but under-performing mechanically, or to be effective at low level but languish at high, or vice versa - or quite a lot of other things. Early D&D groped around for balancing mechanisms and came up with a lot of them - weapon & armor proscriptions, varied exp tables, maximum levels, minimum stats, racial restrictions, magic item distributions, gotchya monsters, and direct DM intervention, just for a start.
What we, today, would call 'trap' choices were just another one of those early attempts at flogging some semblance of balance into the gaming experience.
That we're back to that in 5e might seem like lack of progress - but, there's a real resurgent interest in old-school, warts and all, right now, and 5e has made design choices accordingly.
Critical as I often am of 5e, I freely admit that I've had a blast running it, it's so much like running old-school D&D and other early games. It scratches that same itch as dusting off old books and paleo-gaming.
I personally am not a fan of archery specialisation for the fighter class, I admit, but that's in part because I would prefer something like an archer class where the player publically commits to that role. For instance I was content with the ranger as the archer class in 4e, as it could IMO be easily reskinned as a non woodsy archer for those who disliked some of the ranger flavour.
My nostalgia in relation to the fighter class is for the melee fighter, I admit.
The Archery combat style in 5e is a pretty solid commitment to being a great archer over a great melee type or high-AC tough guy. All you need is a finesse weapon or two to be a pretty darn good melee type, too, and your AC is likely to be pretty good, but the +2 to attacks says "archery first" pretty loudly in the context of bounded accuracy.