- would it make sense to name the constructor after the class
  (avoiding 'constructor' and 'new')?

That seems to be a 'no', then:-) It might be useful to document
such obvious but rejected options, with counterarguments:

- repeated name
- readability/search concerns (constructor determined non-locally,
   by class name matching)
- what to do about anonymous classes?
- preempts class name as prototype property

The various arguments revolving about names and anonymous
classes suggest another alternative:

- use an anonymous function declaration in the class as the class constructor

Again, I'm not arguing in favor or against, I'm only looking
for alternative design options.

Claus

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to