http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252014-03-11T01:49:53ZRedmineWt - Feature #2794: [PROJECT] Create Guidelines Subjecting Namespaceshttp://redmine.emweb.be/issues/2794?journal_id=84272014-03-11T01:49:53ZI. Lazaridisinfo@lazaridis.com
<ul></ul><p>from <a class="message" href="http://redmine.emweb.be/boards/1/topics/8655?r=8692#message-8692">RE: Blog Examples and Wt Best Practices</a></p>
<p>Koen Deforche wrote: </p>
<blockquote>
<p>I. Lazaridis wrote:<br><br>
> > We've actually moved away from importing the Wt namespace in examples to make them easier to understand (even if they are then a bit harder to read).<br><br>
><br><br>
> I understand your point of view.<br><br>
><br><br>
> Readability should be compared to other (non C) web frameworks, too, and "with the eyes" of a newcomer (not long-year experts, like you). Someone who is e.g. used to ruby code will get simply a shock looking at the code, backing immediately off. </p>
<p>I understand that. But we should not only make it look easy, it should also be actually easy, and stripping of namespaces from examples turns out to make actual 'copy/pasting' harder and slows down comprehension.</p>
</blockquote>
<p>"simple copy/paste" is not a priority requirement (at least that's not the reason I use C). And what slows my comprehension down, is code full of redundancy and repetition.</p>
<p>As a solution: you don't have to strip namespaces away, just leave them in the head section of the file (using declarations).</p>