diff --git a/HACKING b/HACKING index 190722d5..b2ee6c37 100644 --- a/HACKING +++ b/HACKING @@ -110,7 +110,16 @@ is hard to read. The exceptions to this rule are for objects with __iterator__ set, and for XML objects (see README.E4X). -* Use [] and {} rather than new Array/new Object. +* Avoid using 'new' with constructors where possible, and use [] and + {} rather than new Array/new Object. + Right: + RegExp("^" + foo + "$") + Function(code) + new Date + Wrong: + new RegExp("^" + foo + "$") + new Function(code) + Date() // Right if you want a string-representation of the date * Don't use abbreviations for public methods Right: