[comp.lang.icon] some questions

kellyp@ucscg.UCSC.EDU (17531000) (10/29/89)

Is there a pre-procesor around for making Icon object oriented?  In the
spirit of C++.  If not, how difficult would this be to make?  I'm looking 
for encapsulation and auto-setup/terminate procedures.  The main thing 
is that I don't like to worry about name conflicts when I put modules together.

----

I lost the two messages I received about Emacs helpers for Icon. Could
   you send them again?

----

In article <1487@esquire.UUCP> yost@esquire.UUCP (David A. Yost) writes:
>In article <30300001@uicsrd.csrd.uiuc.edu> petersen@uicsrd.csrd.uiuc.edu ws:
>>It seems the one solution to promoting icon programs as first class
>>citizens would be to use dynamic libraries such as used by the
>>Amiga, OS/2, or SunOS 4.0.  This would allow compilation to machine code
>>without the need to
>		     invoke a separate interpreter program at runtime.
>
>Aside from startup time, would execution time
>or in-core memory residency really be improved?
>
> --dave

Yes.  On the Amiga using a library would make it so that the interpreter
stuff is only loaded once.  As it is currently, each time you invoke
an Icon program the header (interpreter) is also loaded.  Another way to 
fix this is to make the header 'resident'.  This requires that the
header be re-entrant.  In the latest version that I picked up (for the
Amiga) there is only icont and iconx.  The compiled program can not be
invoked itself, you must do 'iconx prg'.  I tried making it resident and
it did some strange things concerning the command line arguments on the
second invocation, and I concluded that it was not re-entrant.

For the Amiga, it seems to me, that the simplest way to avoid double
loads would be to make the interpreter re-entrant and make it 'resident'.
The problems with this is that the load of the interpreter must be made
explicitly (with the resident command) or else you are right back where 
you started (loading multiple copies into memory).  To use a library
would make it so that the load is done implicitly when a compiled Icon
program is invoked.  To make a library would be a heck of a lot harder.

If this was done, tho, you have an interesting situation: any program may
access the library.  The library could be used as an imbedded virtual
machine within an application.
-----------------------------------------------------------------------------
Patrick Kelly    ----   mail to kellyp@ucscB.ucsc.edu   ----    Zxcvbne Rtyui
-----------------------------------------------------------------------------