My opinion, FWIW, is that both have a place
Freeweights are superior to machines for the development of practical strength because they recruit all sorts of supporting muscles and trigger all sorts of neurological adaptations. You have to go out of your way, almost, to isolate a muscle group using freeweights, and AFAIK, it's not possible to do so perfectly.
At the same time, machines are superior when you do need to isolate a muscle, perhaps in order to protect an injury, or to avoid an injury, or to occasionally work a particular muscle group at a greater weight than one might normally be able to.
If I had to have one or the other, I'd pick freeweights. And if I had access to both, I'd make freeweights the foundation of my training. But I wouldn't pull up the garbage truck to the back entrance of my gym and start shoveling out the machines, either.