I'm struggling to work out why anyone would want to do this. Leaving aside the other concerns, I personally find input via touchscreen pretty painful and can't imagine being able to program at any real speed. It's entirely possible I'm missing something though!
I'd say coding using just a touchscreen would be terrible, but keep in mind that tablets aren't limited to just the touchscreen. In fact, you can plug a full-sized mechanical keyboard into an iPad (though the more common keyboard is likely the smartcover.
Text-based coding, sure. But the jury is still out for visual programming systems, of either the Scratch (syntax expressed via custom "puzzle pieces") or the LabVIEW (flow-based semantics) kind.