[Prev][Next][Index][Thread]
Can one do the following in dylan?
-
To: info-dylan@ai.mit.edu
-
Subject: Can one do the following in dylan?
-
From: Samuele Pedroni <pedroni@inf.ethz.ch>
-
Date: Tue, 27 Mar 2001 12:15:05 -0500 (EST)
-
Organization: Swiss Federal Institute of Technology (ETHZ)
-
Xref: traf.lcs.mit.edu comp.lang.dylan:13154
[the motivation of this mail is really intellectual curiousity, not to
start a flamewar, java
is not my language-of-choice, I have not such a thing]
In java the following is possible:
<Plugin.java>
public interface Plugin{
public void init();
public Object do(Object action);
}
</Plugin.java>
<Foo.java>
...
Plugin plugin = (Plugin)Class.forName(pluginName).newInstance();
// pluginName is the "name" of a up to runtime unknown and separately
compiled class
// implementing the Plugin interface
...
</Foo.java>
Is something like that (*language-aware* dynamic loading, no C low-level
shared library stuff)
possible in dylan? (AFAIK no but ...)
Thanks.
PS 1. what's the sense? (ignoring impl aspects, applet hype and security
concerns) this is one the few
things that is a non controversial java win (sometimes a big-win) =>
- is such a feature useful/unuseful?
- is it compatible with dylan philosophy? with dylan "design
compromises"?
2. yes it's the cause of many java design compromises (I know!)
Follow-Ups: