<font face="tahoma,sans-serif">This is exactly what I am going for, simply to enhance compile-time and static analysis, when the developer has identified they wished to override a particular method.  </font><div><font face="tahoma,sans-serif"><br>
</font></div><div><font face="tahoma,sans-serif">I am definitely not looking to introduce method overloading or scoping as that is far too intrusive.</font><div><font face="tahoma,sans-serif"><br></font></div><div><font face="tahoma,sans-serif">Cheers,</font></div>
<div><font face="tahoma,sans-serif"><br></font></div><div><font face="tahoma,sans-serif">Stu</font></div><div><font face="tahoma,sans-serif"><br clear="all"></font><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(80, 0, 80)"><strong><span style="color:rgb(153, 204, 255)">Stuart Carnie, CTO</span></strong><br>
<span style="color:rgb(255, 102, 0)"><strong><a href="http://manomio.com/" style="color:rgb(255, 102, 0)" target="_blank">manomio</a> | in retro we trust!</strong></span></span><br>
<br><br><div class="gmail_quote">On Mon, Nov 29, 2010 at 6:27 PM, Alexei Svitkine <span dir="ltr"><<a href="mailto:alexei.svitkine@gmail.com">alexei.svitkine@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The benefit of an @Override annotation (for e.g. as implemented in Java) is for the compiler to warn you if you're not actually overriding something when you think you are. Which could happen if the superclass changed since the time you wrote the code or if you made a typo in the method name/signature.<div>


<br></div><div>This is completely orthogonal to overloading. (Though I don't know Stuart's actual intention.)</div><div><br></div><div>-Alexei<br><div><br></div><div><br></div><div><div class="gmail_quote"><div><div>
</div><div class="h5">On Mon, Nov 29, 2010 at 8:13 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><div style="word-wrap:break-word"><br><div><div><div>On Nov 29, 2010, at 4:09 PM, Stuart Carnie wrote:</div>


<br></div><div><blockquote type="cite"><font face="tahoma,sans-serif">Hi all,</font><div><font face="tahoma,sans-serif"><br></font></div><div><font face="tahoma,sans-serif">I would like to have a go at hacking a little on Clang when a get a bit of spare time, and have found that adding support for override would be useful little exercise.  I've seen another post referring to Clang's support for __attribute__((override)), and seems like I could use this as a starting point.</font></div>



<div><font face="tahoma,sans-serif"><br></font></div><div><font face="tahoma,sans-serif"><a href="http://weblog.bignerdranch.com/?p=171" target="_blank">Big Nerd Ranch</a> would like to see an @override keyword, as follows:</font></div>


<div>
<font face="tahoma,sans-serif"><br></font></div><div><font face="tahoma,sans-serif"><span style="font-family:Verdana, Tahoma, Arial, sans-serif;font-size:12px;color:rgb(48, 48, 48);line-height:19px"><pre style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;font-family:Courier;font-size:1.2em;width:672px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-width:initial;border-color:initial;border-top-width:thin;border-right-width:thin;border-bottom-width:thin;border-left-width:thin">
@override
- (NSInteger)numberOfSectionsInTableview:(UITableView *)tv
{ ... }</pre></span></font></div></blockquote><br></div></div><div>Hi Stuart,</div><div><br></div><div>Is your  goal here to allow overloading of ObjC methods?  If so, the parsing isn't the hard part, you'd need to mangle selectors somehow, and enhance the runtime to support this.  This isn't something we want in ObjC, because want to keep it simple.</div>


<div><br></div><font color="#888888"><div>-Chris</div><br></font></div><br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>