www.digitalmars.com         C & C++   DMDScript  

D - Dynamic Invocation

reply "Barker, Michael [LON40:4751:EXCH]" <mbarker europem01.nt.com> writes:
The two features that set Java ahead of C++ (in my opinion) are:

1.  A top level Object class (which D supports, yippee).
2.  Dynamic Invocation.  With Java I can, at runtime, find the class I
want, find the constructors/methods that I need and create an
appropriate object instance to handle types of input I have.  This is an
extremely powerful feature that is useful in many different
applications.  Especially when it's necessary to have an application
that is extensiable at at runtime.  In order to support this, it obvious
that some kind of reflection/introspection interface is required.  Is
this supported in D?

Otherwise looks pretty good.  The contract stuff is quite nice.

-- 
Michael Barker
mbzzz hotmail.com
Aug 17 2001
parent reply "Walter" <walter digitalmars.com> writes:
Dynamic class loading is not supported, although there will be the
capability of examining a type to see what properties it has. This is useful
for garbage collection <g>.

Barker, Michael [LON40:4751:EXCH] wrote in message
<3B7CDECB.23116459 europem01.nt.com>...
The two features that set Java ahead of C++ (in my opinion) are:

1.  A top level Object class (which D supports, yippee).
2.  Dynamic Invocation.  With Java I can, at runtime, find the class I
want, find the constructors/methods that I need and create an
appropriate object instance to handle types of input I have.  This is an
extremely powerful feature that is useful in many different
applications.  Especially when it's necessary to have an application
that is extensiable at at runtime.  In order to support this, it obvious
that some kind of reflection/introspection interface is required.  Is
this supported in D?

Otherwise looks pretty good.  The contract stuff is quite nice.

--
Michael Barker
mbzzz hotmail.com

Aug 18 2001
parent reply "interested" <here nowhere.net> writes:
Does that mean loading class through something like Dynamic Link Libraries
(DLLs) is not possible?

Walter <walter digitalmars.com> wrote in message
news:9lml50$10vj$2 digitaldaemon.com...
 Dynamic class loading is not supported, although there will be the
 capability of examining a type to see what properties it has. This is

 for garbage collection <g>.

Aug 18 2001
parent "Walter" <walter digitalmars.com> writes:
DLLs are entirely possible. It's just that types are fixed at compile time.

interested wrote in message <9lnfsi$1gb9$1 digitaldaemon.com>...
Does that mean loading class through something like Dynamic Link Libraries
(DLLs) is not possible?

Walter <walter digitalmars.com> wrote in message
news:9lml50$10vj$2 digitaldaemon.com...
 Dynamic class loading is not supported, although there will be the
 capability of examining a type to see what properties it has. This is

 for garbage collection <g>.


Aug 18 2001