This it a lot less true today than it would have been several years ago. I'm a designer and most of the younger designer's I know are comfortable programming in several languages.
Anyway, your statement is an oversimplification. You could also say that the website the designer made would have better usability and be more engaging for the users (but perhaps buggy), while the developer would have a well coded site that no one (except maybe other developers) would want to use.
You aren't a designer if you actually produce code. If you "can" code but do not, and use dreamweaver or a similar drawing to code tool, then yeah, you are a designer.
Developers can make a program or web site using a text editor.