<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div class="">What about this syntax?<br class=""><br class="">for … {<br class=""> &nbsp;if … {<br class=""> &nbsp;&nbsp;&nbsp;…<br class=""> &nbsp;} /if<br class="">} /for<br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">I have the feeling we are double defining the blocs here :</div><div class="">for ... /for is enough to have the beginning and the end if the bloc, and so is { ... }.</div><div class=""><br class=""></div><div class="">So I think that syntax is redundant.</div><div class=""><br class=""></div><div class="">I also think that such a solution would only solve half of the readability problem in a complex code.</div><div class=""><br class=""></div><div class="">Consider for exemple this piece of pseudo code :&nbsp;</div><div class="">------------------------------------------------------</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span>// insert here a big number of lines</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; }</div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">&nbsp;&nbsp;<br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span>// insert here a big number of lines</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="font-family: 'Times New Roman'; font-size: 14px;" class="">------------------------------------------------------</div><div style="font-family: 'Times New Roman'; font-size: 14px;" class=""></div></div></div><div class=""><div class="">This thing end up with 3 closing block in the end, and if you have enough lines of code instead of the two comments, you don't see the beginning of those any more.</div><div class="">Considering the proposed syntax, you end up with that :</div><div class=""><br class=""></div><div class=""><div class="">------------------------------------------------------</div><div class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span>// insert here a big number of lines</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; } /<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; } /<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">&nbsp;&nbsp;<br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span> (...) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span>// insert here a big number of lines</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; } /<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">for</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; } / <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">} /<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="font-family: 'Times New Roman'; font-size: 14px;" class="">------------------------------------------------------</div><div class=""><br class=""></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class="">You have a bit more info, for sure. But not yet enough to clearly identify what bloc is being closed by a given line. To have it all, you would have to copy the whole condition ... but that would be copy / past.</span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class="">In the end I have the feeling the advantage of the proposal is not huge, whatever the syntax. Not enough to add new keywords.</span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class="">I agree with Marc that refactoring seems a good solution when it becomes hard to know what block ends where.</span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: 14px;" class="">Jerome</span></div><div class=""><br class=""></div><div style="font-family: 'Times New Roman'; font-size: 14px;" class=""></div></div><div class=""></div></div></body></html>