I would set up the www subdomain to point to the same location as no subdomain. That way the www is entirely optional with no consequence to your users.
The two addresses in your example will be indexed separately even if they point to the exact same page. That redundant indexing will hurt you as search results will be split between two valid results. Mitigate all those problems by use of a canonical link tag.
<link rel="canonical" href="http://example.com/" type="text/html"/>
The type attribute is a valid attribute on all link tags, but as far as I know it is not supported by search engines at this time. I throw it in there as I think it will likely assist indexing in the future when it comes to assisting a search bot make sense of the page after initial analysis.