Terry Pratchett is the first that comes to mind; he never writes "didactically," but it's clear in what he writes that he understands very well a lot of different issues. An anti-example would be Michel Crichton, who doesn't know what he's talking about, but he talks about it anyway with disdainful authority.
no subject