[Prev][Next][Index][Thread]

Re: On introspection of the dynamic environment



Dustin Voss wrote:

> In what way is Dylan's
> threading model more elegant/integrated than Java's?  Well, okay, Java
> does very little that's elegant, but the threading constructs seem
> quite capable to me...

Functional Developer Dylan's binding of a dynamic environment to a thread,
the use of restarts and notifications on threads, and the way threads are
integrated into class and variable definitions are elegant. It's almost
like the language is integrated into threads, rather than threads being
integrated into the language. Java's threading is nice (I'd certainly never
used threads before...), but you can't call stop() on a Thread in a
thread-safe way and the synchronization is a big hit to either the
processor or the programmer.

> Actually, I agree that locating classes and methods by name would be
> handy.  But I found an old post says that Dylan's naming model makes
> that inherently difficult, maybe impossible.

I didn't know that.

> At the very least, I'd like to be able to obtain a list of running
> threads.

In the source code to DUIM, the event queus are handled as threads, held by
the event dispatcher and notified when they get an event. There is nothing
to stop a program keeping a list of all its threads, or grouping them in
this way. Java does this with ThreadGroups, and I think that threaded net
servers in C/C++ do the same.

- Rob.




References: