Would some like Object.inspect(myObj) be useful?

Tom Van Cutsem tomvc.be at gmail.com
Mon Jun 18 23:25:43 PDT 2012

2012/6/14 Allen Wirfs-Brock <allen at wirfs-brock.com>

> On Jun 14, 2012, at 10:52 AM, Brendan Eich wrote:
> ...
> Thanks. Any reason this wasn't included in ES5 that you recall?
> Minimalism.  Object.* wasn't intended to be a comprehensive reflection
> library, just a set of essential primitives that could be used tin building
> such.

I think that was a good choice. There are many utility functions one may
want to build on top of ES5's set of primitives. For example, traits.js was
my attempt at providing a minimal number of utilities to treat property
descriptor maps as composable traits. (The above inspect function is
exactly traits.js's Object.getOwnProperties which lifts an object literal
into a property descriptor map, cf. <

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120619/08762d4c/attachment.html>

More information about the es-discuss mailing list