Should a programmer be able to perform all operations programmatically on a object that a user could do?By way of example, I'm working with a list selection object. To populate the list List.AddItem(itemData) is repeatedly called until it is built. A user can then:View the entire listSelect a single item from the listHowever there is no programmatic way to list all of the items. Nor is there an easy way to set an item as selected. You can if you keep track of what was added to the list and call List.SelectItem(itemData). This means you'd have to maintain an independent list of the items separate from the object, which could cause it's own problem (This bit of ugliness isn't necessary to the question, but part of the motivation).In general if a user can get information about an object or perform an action on an object should this same functionality be available to the programmer and not hidden? I suspect the answer is yes but recognized I may be overgeneralizing from this one case that I'm unhappy with.
Should a programmer always be able to do everything a user could do?
design