I think this thinking makes sense if you've not used enough programming languages pragmatically.
But, if you squint, great API design is a bit like embedded domain specific language design as well.
I think there's room for both.