1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:07:59 +01:00

Recfactoring:

* Standard module format. All modules are explicitly declared
   as modules, they're created via a constructor and
   instantiated automatically. They're dependency aware. They
   stringify properly.

 * Classes are declared the same way (rather like Structs
   already were). They also stringify properly. Plus, each
   instance has a rather nifty closure member that closes all
   of its methods around 'this', so you can pass them to map,
   forEach, setTimeout, etc. Modules are themselves classes,
   with a special metaclass, as it were.

 * Doug Crockford is dead, metaphorically speaking.
   Closure-based classes just don't fit into any of the common
   JavaScript frameworks, and they're inefficient and
   confusing. Now, all class and module members are accessed
   explicitly via 'this', which makes it very clear that
   they're class members and not (e.g.) local variables,
   without anything nasty like Hungarian notation.

 * Strictly one module per file. Classes that belong to a
   module live in the same file.

 * For the moment, there are quite a few utility functions
   sitting in base.c, because my class implementation used
   them, and I haven't had the time or inclination to sort them
   out. I plan to reconcile them with the current mess that is
   the util namespace.

 * Changed bracing style.
This commit is contained in:
Kris Maglione
2009-11-08 20:54:31 -05:00
parent 46b7a29fb7
commit 6a25312c7d
46 changed files with 15950 additions and 17909 deletions

View File

@@ -1,6 +1,6 @@
// Header:
const Name = "Muttator";
// The following doesn't work here, so this module's code is sadly suplicated:
// The following doesn't work here, so this module's code is sadly duplicated:
// Components.utils.import("resource://liberator/commandline-handler.jsm");
// Copyright (c) 2009 by Doug Kearns