The 50mm 1.8D is super sharp for a cheap lens
If you are new to photography you might be asking yourself why buy a prime lens and limit myself when I can buy a zoom lens and cover a lot more distance without having to move.
Prime lenses are basically lenses with a fixed focal length. For instance I own the Nikkor 50mm 1.8D lens, that means it is a fixed focal length of 50mm with a maximum aperture of 1.8.
That means that the camera "frames" the subject at a certain fixed distance (the distance will depend whether you have a full frame sensor or a crop sensor). If I wanted to frame more or less of my subject I would have to physically move myself closer or farther away. Here are were the zoom lenses shine. With just a rotation of a ring I can actually resize the framing and not have to move at all.
This is a fast lens. Ideal for low light situations So why consider a prime at all?
The answer is in the elements of a lens and more specifically in the optics. Any lens will have glass elements inside and some are allowed to move to focus the image. As a rule of thumb the more elements a lens has the more difficult it is to design and therefore also more expensive to produce. Prime lenses usually have fewer elements than zoom lenses so they can be cheaper but more importantly they can be sharper as the design is less complicated.
So why not buy just prime lenses?
Well you are trading something for something else. Sometimes having the flexibility of a zoom lens can be desirable since you don't have to change lenses every time. Travel photography can be a good example. You might want that portrait of a person playing the flute but then turn around and see a person having a cigarette from their balcony and before you know it you are zooming in. With a prime that person might have gone inside by the time you changed your lens.
The other problem is that you might need more primes to cover all of the focal lengths you could with zoom lenses leading you to carry a big collection and even sometimes spending more money. When you are purchasing lenses try and keep all of this in mind.
Do all zoom lenses have inferior optics?
No, not at all. There are limitations for zoom lenses but you can get good glass that zooms too. Pricier of course but you get what you pay for.
Sometimes what you need is a zoom and there is no way around it So what is the ideal lens prime or zoom?
There is no such thing as the ideal lens. There are lenses that are better for particular situations but overall you are the artist and the creator. Most photographers have zooms as well as primes. I carry a 17-50mm f2.8 Sigma and a 50-150mm f2.8 Sigma for my D300 but I also have the Nikkor 50mm 1.8D for when I want that extra crisp detailed picture. It is a small lens but handy in a lot of situations. What will work for you is dependent on the kind of photography you do.