diff --git a/HACKING b/HACKING index 9a468b93..83f8ef35 100644 --- a/HACKING +++ b/HACKING @@ -98,6 +98,17 @@ We try to be quite consistent, but of course, that's not always possible. The exceptions to this rule are for objects with __iterator__ set, and for XML objects (see README.E4X). +* 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 + == Testing/Optimization == TODO: Add some information here about testing/validation/etc.