Re: Dynamic languages (again)

"cao jing" <[email protected]>
Newsgroups gmane.comp.programming.aspect.general
Message-ID <[email protected]>
so, runtime MOP and runtime metaobjects do not belong to dynamic languages
only, static languages also can have runtime MOP.
i think maybe JAVA just has some runtime metaobjects. In java, does every
class exist as a metaobject?

2006/3/21, Jim Haungs <[email protected]>:
>
> There's nothing inherently reflective about dynamic languages, nor vice
> versa. The concepts are orthogonal.
>
> Dynamic (at least in my definition) means that variables are bound to
> values at run-time, and methods are dispatched via run-time look-up. True,
> this requires the VM to introspect the method dictionaries, but nothing
> requires the running user-level program to actively introspect anything.
>
> And Java has reflection without fully-dynamic typing. By "not
> fully-dynamic" I mean you can declare a variable to be of type Object, and
> put any reference type in there, but you can't put an unboxed primitive in
> there, something you can do in Smalltalk and Ruby because everything
> inherits from Object, even so-called "primitives."
>
> On 3/20/06, Cristina Videira Lopes <[email protected]> wrote:
> >
> >  Let me second the last sentence of the previous message. As a dynamic
> > reflective language, Ruby rocks! It's really cute. And it's quite amazing
> > what people are doing with it -- if you're into learning about it, don't
> > miss Ruby on Rails. I recently taught an undergrad course on PLs, where I
> > used Ruby at some point. The students were fascinated.
> >
> > (I have objections about some of the assumptions behind reflective
> > languages, in general, but that's another story...)
> >
> >
> >  ------------------------------
> > *From:* [email protected] [mailto:[email protected]] *On
> > Behalf Of *Jim Haungs
> > *Sent:* Monday, March 20, 2006 8:06 AM
> > *To:* Pascal Costanza
> > *Cc:* cao jing; [email protected]
> > *Subject:* Re: [aosd-discuss] discuss Digest, Vol 30, Issue 7
> >
> > In Smalltalk, dynamic typing and dynamic dispatch are closely related.
> > In Smalltalk, variables are merely slots for pointers; they can hold
> > anything. Everything is an Object, including booleans, integers and strings,
> > even blocks of code.
> >
> > When a message is sent to an object in a slot, the message name is
> > looked up dynamically, and if a matching method is found, it is executed.
> > This sounds egregiously slow, but good VM's play all sorts of tricks to
> > optimize the overhead away.
> >
> > It's also possible to handle the doesNotUnderstand: error raised by the
> > VM when an appropriate method is not found, yielding delicious possibilities
> > like faulting an object into memory from a database and then returning to
> > the original failed call with the correct object now reified.
> >
> > If you think Smalltalk is interesting but passe, check out Ruby. It's
> > basically Smalltalk reincarnated as a scripting language.
> >
> > On 3/20/06, Pascal Costanza <[email protected]> wrote:
> > >
> > >
> > > On 20 Mar 2006, at 02:10, cao jing wrote:
> > >
> > > > so, i think SMALLTALK is a kind of Dynamic language, right?
> > >
> > > Definitely yes.
> > >
> > > > or, maybe SMALLTALK has some features of static languages, if
> > > > it has, then what are they?
> > >
> > > Since Smalltalk allows you to change almost anything at runtime,
> > > including the class hierarchy, method definitions, etc., it's hard to
> > > state that anything about Smalltalk is static. However, I am no
> > > expert about Smalltalk, it may be that some things you can do have
> > > implications that I am not aware which would render them as
> > > practically static. It may be a better idea to ask these questions in
> > > a Smalltalk-related mailing list or newsgroup, like
> > > comp.lang.smalltalk.
> > >
> > > > BTW, is dynamic typing  the main feature  of  Dynamic language?
> > >
> > > It's certainly one of the main features. Dynamic dispatch is another
> > > one.
> > >
> > >
> > > Pascal
> > >
> > > --
> > > Pascal Costanza, mailto:[email protected], http://p-cos.net
> > > Vrije Universiteit Brussel, Programming Technology Lab
> > > Pleinlaan 2, B-1050 Brussel, Belgium
> > >
> > >
> > >
> > >
> > >
> > > __________________________________________________
> > > AOSD Discuss mailing list    -     [email protected]
> > > To unsubscribe go to http://aosd.net
> > >
> > > Check out the AOSD.net Wiki: http://aosd.net/wiki
> > >
> >
> >
>

__________________________________________________
AOSD Discuss mailing list    -    [email protected]
To unsubscribe go to http://aosd.net

Check out the AOSD.net Wiki: http://aosd.net/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.