This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: supporting dynamic/interactive procedure re-definition
- From: Helmut Eller <eller dot helmut at gmail dot com>
- To: kawa at sources dot redhat dot com
- Date: Thu, 07 Oct 2010 09:27:38 +0200
- Subject: Re: supporting dynamic/interactive procedure re-definition
- References: <4C84717B.5080103@bothner.com> <m2mxqujxo2.fsf@gmail.com> <4CAD1644.7030301@bothner.com>
* Per Bothner [2010-10-07 00:37] writes:
>> Also isn't there a more direct way to call non-exported toplevel
>> functions? E.g. there could be a namespace for the module foo and
>> foo:bar could refer the non-exported function.
>
> One of the reasons for module-private variables is so that the compiler
> can see every use. That means a variable might be optimized away,
> or represented in a non-standard way.
>
> But the bigger reason is for information hiding. So the programmer
> can change module internals and not have to worry about clients
> depending on those internals.
Sure, but currently I either have to restart the JVM process or export
much more than I otherwise would just so that I can debug it. Also it's
more problematic to use the same name for different things in different
modules; I have to uses a globally unique name just for the case when I
need to export it for debugging.
> Of course a debugger needs access to internal definitions, and I could
> see it might be useful during development. So perhaps there could be
> a debug mode allowing what you're asking for. How much of an
> annoyance is this?
You mean debug-mode vs. locked-down-mode? That would be fine by me.
Helmut