On Tue, Jun 28, 2011 at 3:34 PM, Bob Nystrom <[email protected]> wrote: > I like the simplicity of this, but I'm not crazy about how it merges two > distinct objects into one. TodayJS (and most class-based languages) let you > distinguish two things: > 1. A set of properties relevant to the class itself. > 2. A set of properties shared by each instance of the class. > In a class-based language, #1 up there is "static" methods and fields. So > when you do something like this in Java: > Integer.parseInt("1234"); > The "parseInt" method isn't a method that you can call on an integer, it's a > method you call on the Integer class itself.
Actually, in Java, you can (or could, when last Java and I spoke) call class methods on instances: Integer boxed = new Integer(5); boxed.parseInt(42); That doesn't work well in JS, because obviously there's no prevention of name collisions. Mike _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

