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


当前回答

其他回答

//uncomment the following line if the program manager changes her mind again this week

我曾经在一个用Paradox 3.5 -编写的大型预算系统工作多年后接到一个客户的电话

“我们在调试中遇到了一些注释”-

// This shouldn't happen, if it does, then the bits that automagically 
// worked when I wrote it have stopped working

... !

我在一个充满显式怪异类型转换的函数中见过这段代码:

// Since today's CPUs are really fast, this is dedicated to those who said:
// " You can't use Moore's Law as an excuse to write bad software. "

代码太可怕了:)

#!/usr/bin/sh
#       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
#         All Rights Reserved

#       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#       The copyright notice above does not evidence any
#       actual or intended publication of such source code.

#ident  "@(#)false.sh   1.6     93/01/11 SMI"   /* SVr4.0 1.3   */
exit 255

从SunOS 5.9即Solaris 9获取(/usr/bin/false)

double penetration; // ouch