Allen Wirfs-Brock allen at wirfs-brock.com
Wed Aug 24 09:32:34 PDT 2011

On Aug 24, 2011, at 2:09 AM, Andreas Rossberg wrote:

> On 24 August 2011 01:07, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
>> Also there can be real problems with exposing too much program metadata directly to the application layer. I've had lots of experience with Smalltalk environments where this was the case and it leads to a muddling of the metalayers and the application layers of a system because many developers don't understand the concepts of stratification well enough to know which methods are not really appropriate for use in application logic.
> That is true, although you cannot really blame the programmers when
> the language designers already muddled it up. That very sin has been
> committed in JavaScript, for example, by putting arbitrary reflective
> methods into innocent intrinsics like Object. I guess programmers
> would be much less likely to abuse them if they had a separate home in
> an object/module explicitly named Meta, Reflect, or something.

I totally agree.  Rather than adding lots of new Object.* methods I'd generally prefer that we start placing future metaprogramming APIs into various modules. 

I do, however, think that we will need to add Object.defineMethod in ES.next. 

(BTW, I've been experimenting with what the API for a Mirrors-based reflection module might look like:  http://www.wirfs-brock.com/allen/posts/228 )


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110824/004f4214/attachment-0001.html>

More information about the es-discuss mailing list