The difference is that
pop-to-buffer-same-window doesn't insist as much about using the same window.
switch-to-buffer has been used for 2 purposes:
- change which buffer is shown in the selected window.
- display the specified buffer.
In many cases you can do both at the same time, but in some cases you have to choose between the two (e.g. when the selected-window is a minibuffer window).
switch-to-buffer cares more about the first, while
pop-to-buffer-same-window cares more about the second.
Personally I recommend you stay away from
switch-to-buffer in Elisp code (in 99% of the cases where I see
switch-to-buffer in Elisp code, the code will misbehave when used with my config). Better use
pop-to-buffer-same-window or use
set-window-buffer depending on your specific needs.