Personally, I prefer David Gilmour. Syd Barrett played a very special role in shaping the band for the future, but I don't think the group would have reached nearly the same success with Syd still as their frontman. Though without him ever being there, I doubt things would have turned out the same way. The whole band coming together the way it did was a chain of events in which if it had happened any other way, it would have been completely different.
Though Roger wrote most (I could almost say all) Pink Floyd songs, David co-wrote some of the biggest tracks off The Wall like Young Lust, Comfortably Numb, and Run Like Hell. He has played quite a crucial role in the band over the years.
Syd's departure from the band paved the way for an important new leader to rise- and that would be Roger Waters. Every song he writes is just a masterpiece. Though this may be, I don't think he could have done it without David. Just watch this video and you'll see what I mean:
http://www.youtube.com/watch?v=mV9AwB-DnoI
David's soft melodic voice flows so naturally with Roger's dark vocals. I can't explain it any other way but- magical.