Some people can think while walking.
Some people need to sit down to think.

I guess for the former, a tablet could be useful for programming. For the later it gives no advantage.

Some people will like typing on a tactil screen. Some other people prefer mechanical clicky keyboards. (cf. DasKeyboard, Filco, Elite, HappyHacker etc).

I guess for the former, a table could be used for programming. For the later, it would be inconvenient.

some people like to draw UML diagrams and organigrams to design programs. Some other people prefer to use symbols written as words to program.

I guess for the former a tablet could be useful for drawing programming diagrams or oganigrams. For the later, it wouldn't help.

Here I should note that in mathematics, geometry looks graphical. It's actually just as symbolic and removed from any graphic aspect as any other part of mathematics. Graphical forms are just a crutch for the brain, the real thing is essentially symbolic and logic.

I stand definitely in the later camp, but I would also remark that the question is not that binary. I wouldn't mind an IDE that would build UML diagrams from the specification text or the source code I write. I'd just consider a tablet as an auxiliary I/O device, just like a mouse or trackpad can be used occasionnaly to point at some source token or file, or some GUI, to represent some graph. But for me, the main material is the source as its symbolic representation, and the main input device is the keyboard.

If you have a look at the various mind reading devices developped so far, you will notice that they don't provide more than a bit a few second input stream. If you look at speach recognition, you will notice that given the delay and ambiguity of recognition, you don't get more than a few bits per second input stream. Even with the mouse, trackpad, or touch screen, using a 2D continuous input doesn't give you that many bit/s input stream, once you've filtered the noise and the time needed to target the exact position on the screen. Only some graphical or musical application can really benefit from the use of a continuous 2D input, and again, for musical applications for example you might prefer a more conventional musical instrument-like input device (keyboard, string, drum surfaces, etc), and there are good ergonomic and kinetic reasons for that.

Finally, keyboards, with their 70-200 word/minute input speed, which gives about 8 bit of information per second, given that in English for example, each letter account for between 0.6 and 1.3 bit of information; in programming it might be more or less, depending on the coding conventions, but notice also that the use of autocompletion features in programming editors allows to avoid wasting too many input bits.

In conclusion, what I'm saying is that so far, the keyboard is the input device that lets you transmit at the hightest bit rate (and it's not that big!) and that programming is essentially a symbolic ie. "textual" logic activity. For these reasons, it makes no sense to try to use a tablet as user interface for programming activities.

On the other hand if you add a bluetooth keyboard, then a tablet with an appropriate OS and the appropriate software (ie. basically, Android) can be used as a standalone programming computer that would not be worse than what we had 20 or 30 years ago.

For the fun, you could have a look at the Piet programming language.
https://esolangs.org/wiki/Piet

For fun, you could write an implementation of Piet on tablets; programming would basically be like drawing 16-color bitmap pictures in the old times; you could add some high level features in the editor, like selecting a loop for copy-pasting or moving blocks of code (ie. blocks of pixels), but it wouldn't make it easier to program with the tablet than with a keyboard, for the essential reason that in your brains, programming is a symbolic activity that has nothing in common with catching a ball.