An experiment using an object literal based class definition pattern
allen at wirfs-brock.com
Mon Aug 8 12:40:29 PDT 2011
On Aug 5, 2011, at 4:15 PM, Bob Nystrom wrote:
> On Fri, Aug 5, 2011 at 3:29 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> I think the Class function I suggest above could be an answer. But exploring this was my motivation in writing a significant amount of code using my pattern. I personally didn't find it awkward, error-prone, or to present any readability issues. But that is all subjective. If somebody should translated that corpus into class declarations we can do a side-by-side comparison of readability.
> Brilliant idea. I started doing that here. Example:
This is a great start Bob.
A couple things I noticed with your version:
In AbstractClass, you moved the name property from the class side to the instance side. I assume this was unintentional.
We should probably try to use the same formatting and whitespace conventions across all the versions we want to compare. Currently I find that those differences between the two versions are more noticeable then the actual substantive syntax differences.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss