1、最近看别人写的js代码中有 FIXME 标识,不知其含义。bing了一下,并未找到对 js 这种标识的特殊说明,大多都是说 eclipse 中特殊的注释,但是看到好东西,还是要记录一下滴。
2、总结:代码中TODO、FIXME、XXX等注释单词,特殊含义:
TODO: No problem, but addtional code needs to be written (usually when you are skipping something)
注释处有未编写的功能代码,一般会简略描述未实现的功能。
FIXME: This works, sort of, but it could be done better. (usually code written in a hurry that needs rewriting)
注释处代码需要修正,甚至代码是错误的,不能工作,需要修复,如何修正会在说明中简略描述。
XXX: Warning about possible pitfalls, can be used as NOTE:XXX:
注释处代码虽实现了功能,但实现的方法有待商榷,希望将来能改进,待改进的地方会在说明中简略描述。
NOTE: (描述功能)Description of how the code works (when it isn’t self evident)
HACK:( 填坑)Not very well written or malformed code to circumvent a problem/bug. Should be used as HACK:FIXME
BUG: (挖坑)There is a problem here.