We're starting to get some crossed wires. Just to clarify - I don't think anyone is advocating cleaning up immediately after takeoff - at least not in a 737.
An immediate turn is okay, if specified. Normally it's 400'. (Or 450' in bumpyflight's world. . .

)
Some SIDs include immediate turns and some have speed restrictions that require us to fly part of the SID at speeds that may require Flaps > 0.
A flap retraction is not recommended on a G/A including a course reversal. (I wonder if there's a certain heading max/min change or radius they have in mind?)
My FCTM is happily buried in a hotel thousands of miles away, so feel free to correct/quote away.
Cheers