The answer to this kind of question somewhat depends on your goals in learning to sail. It is not that hard to get by out on the water with a pretty basic and rudimentary understanding of sail trim and boat handling. I have met people who have done enormous amounts of offshore sailing who really understand very little about sail trim. If that is all that you want to accomplish, that is OK and you can start with a pretty big boat, 30-35 feet or so.
But if your goal is to really understand how to finese a boat and get the most out of the sails and boat, then I suggest that there are two ways to go. If you are physically fit, have reasonably good ballance and don''t mind getting wet, then a dinghy
in the 12 to 18 foot range can''t be beat. But if you are and adult with perhaps slowed refexes, I have generally found it easier to teach sailing in a boat in the 25 to 28 foot range. The key here is to buy a boat that is light and responsive enough that you can get clear feedback on the success of your sail trimming efforts. I would further suggest that a fin keel/spade rudder boat with a tiller steering gives a lot more feel and so further provides input into the success of your efforts.