你遇到过的源代码中最好的注释是什么?


当前回答

/**
 * Happy Javadoc haiku:
 *
 * Without Javadoc
 * Builds break in Maven site stage
 * This fixes the build.
 */

其他回答

Repeat
    ...
Until (JesusChristsReturn) ' Not sure
/**
 * This run through all the guipublisherbuyRecord , the records those have
 * diff. is buytotal and prior to buy isRecommendedBillingClickedWarning flag
 * is set if priously RB ran and this time not.
 * 
 * --What?
 * 
 * @return
 * @throws AppException
 */

我刚刚在。net的自定义Linq提供程序中找到了这个:

//select is a royal pain in the ass where 
//the parameter passed to CreateQuery isn't actually the one that goes in the call
//requiring this workaround.  Not sure how straight Linq to Objects does it.

还有这个

//expressions have to be compiled in order to work with the method call on 
//straight Enumerable somehow, LINQ to objects itself magically does this.  
//Reflector shows a mess, so I (Aaron) invented my own way.  God love unit tests!

我刚刚也找到了这个…一切都会变得更好

  //ok, this is a hairy, dirty, and nasty piece of code
  //the alternatives are substantially worse than this though
  //i.e. when you do your own provider, LINQ assumes that
  //you are going to implement your own expression tree visitor and
  //do it all yourself.  Frankly, I still have xmas shopping to do
  //and I really don't want us to be foobared when we get
  //even more extension methods added to LINQ
  //therefore, we are pulling execute based on taking the calling the 
  //standard execute on enumerable, but using our own class
  //
  //optimization can occur from here on an as needed basis, that is
  //check for the value of mex.Method.Name, and write a handler for
  //that method
  //
  //also, it may not be a bad idea to rather than do this reflection 
  //each and every time somehow cache the reflected methodinfos and do 
  //lookups that way that said, we need a complete red/green/refactor 
  //cycle here before I am touching that one

还有这个

//Compile that mutherf-ker, invoke it, and get the resulting hash
if(m_measures =/*=*/ --index)
{
    ....

不是注释,而是属性

[ThereBeDragons]

还有一个是我在IHttpHandler的实现中看到的

//What is this?
public bool IsReusable
{
    get{return false;}
}