I've tried it with pretty good results. 2.75 oz (by weight) of blackstrap molasses in 2.25 gallons was good for moderate carbonation, but it didn’t impart much flavor. In most cases I’d suggest just adding enough molasses to get the flavor you want, letting it ferment out, then priming with a pure sugar. The issue with molasses (or any non-pure sugar for that matter) is that different varieties will be more/less fermentable and different yeasts might be able to ferment it better/worse. I did it with a split batch, and infused the molasses with caraway seeds.