Well it all depends on what country you live in, which service provider you use, what phone model you chose and especially what is the current offer on that specific device. Sometimes smartphones are sold with a small discount that is simply not worth it, as other times it can be a real bargain.
But i think it's important to remember that a smartphone sold thru a mobile carrier is essentially the same thing as a loan. You have a discount on the phone, yes, but in return you are engaged for up to 2 years. While if taken without any phone, many carriers offers subscriptions that you can cancel any time you want.
Also, phones provided by carriers are often locked. Some even have customs apps installed that ca be annoying.
So unless you're on a budget or having an amazing deal, i would buy a smartphone unlocked. And a mobile carrier subscription that can be canceled at any time. You might have more money to spend upfront, but that way you have more freedom over which phone and carrier you use.