Accessing func_name from inside a function

Eyal Lotem eyal.lotem at
Tue Mar 28 00:02:21 CEST 2006

Scott David Daniels wrote:

> Eyal Lotem wrote:
>> By the way, the "real" problem here is referencing by name, rather than
>> using "true" references. Which is the result of using a textual language.
>> The "real" solution would be to store real-references to the function and
>> only present the name in a graphical interface.
> There is a problem with this attitude (to which I used to subscribe).
> Just as what constitutes a mathematical proof is a social agreement
> among mathematicians, programmers need to be able to read programs
> by other programmers.  People do not communicate in data structures.
> I worked with LML, a lazy ML variant that (among other things) allowed
> specification of the print form of structures.  I wound up debugging
> (for a nasty 12 hours) a program which printed identically to the
> correct program, but was not, in fact, the correct program.  That one
> experience has convinced me that programs are defined in print, not
> structures.

Well, what you describe is a hidden semantic difference, which is a problem
of the view, not of the representation.  As long as the view can display
the details of the program in their entirety, text has no advantage in this
aspect.  There is no reason why replacing the textual backend with a richer
object model and true references would prevent a simple viewer that renders
the programs as simple text similar to the way they look today. It would
seem almost equivalent but suddenly easy renames, diff tracking for source
control, and semantic editing would not only be possible but easy.

More information about the Python-list mailing list