Re: Dynamic languages (again)

Antonielly Garcia Rodrigues <[email protected]>
Newsgroups gmane.comp.programming.aspect.general
Message-ID <[email protected]>
Quoting Jim Haungs <[email protected]>:

> There's nothing inherently reflective about dynamic languages, nor vice
> versa. The concepts are orthogonal.
Yes, both concepts are orthogonal in theory. But is there some reason in practice for developing a dynamic language other than supporting advanced reflection capabilities? The only exception I can think of is to create a language meant for interpretation only (for instance, the scripting languages used for Web programming).
 
> 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.
I completely agree. Indeed, for most scenarios, you do not need to use reflection at all. But the possibility of intercessive reflection is an advantage of dynamic languages, in my opinion.
 
> 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."
Yes, Java has reflection, but only introspective reflection. Intercessive reflection makes it unconceivable (for me, at least) the use of a strongly typed language. Or is there some way to have intercessive reflection with a "static" language? (It would be nice to learn how it could be done, and which mechanisms for intercession are possible in such languages.)

I am not saying that dynamic languages are bad. Indeed, I really enjoy Smalltalk and the ideas behind it (such as the use of reflection to change the development environment), and I have even done some programming in it. Smalltalk is very cute, and Eiffel (a static language) attracts me a lot too. What I mean is that the choice of the language designer is subject to trade-offs: you gain in one side and lose in another side. You can choose some extra mechanisms for getting a little more reliability or you can choose some extra features for getting a little more flexibility. Anyway, test-driven design is strongly recommended. So, any affirmation that a dynamic language is irrevocably better than a static language (or vice versa) for the same paradigm is not to be seriously considered.

Antonielly Garcia Rodrigues

__________________________________________________
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.