Re: [Scheme-reports] procedure identity Per Bothner (04 Jun 2013 23:20 UTC)
Re: [Scheme-reports] procedure identity Noah Lavine (05 Jun 2013 04:24 UTC)
Re: [Scheme-reports] procedure identity Per Bothner (05 Jun 2013 06:55 UTC)
Re: [Scheme-reports] procedure identity taylanbayirli@gmail.com (05 Jun 2013 10:40 UTC)
Re: [Scheme-reports] procedure identity Alaric Snell-Pym (05 Jun 2013 11:09 UTC)
Re: [Scheme-reports] procedure identity Andy Wingo (07 Jun 2013 21:23 UTC)
Re: [Scheme-reports] procedure identity Alaric Snell-Pym (07 Jun 2013 22:17 UTC)
Re: [Scheme-reports] procedure identity taylanbayirli@gmail.com (05 Jun 2013 11:18 UTC)
Re: [Scheme-reports] procedure identity John Cowan (05 Jun 2013 12:41 UTC)
Re: [Scheme-reports] procedure identity taylanbayirli@gmail.com (05 Jun 2013 14:02 UTC)

Re: [Scheme-reports] procedure identity Per Bothner 04 Jun 2013 23:20 UTC

I like the concept of procedure location tags and procedure identity.
It enable a simple and sane semantics, and it enables useful
features such as associating properties with procedures.

The problem is I would like to allow the following to return true
(as it does in Kawa):

(define (maybe-negate negp)
   (if negp (lambda (x) (- x))
       (lambda (x) x)))
(eq? (maybe-negate #t) (maybe-negate #t))
;; Likewise for eqv?

I.e. the compiler can realize the two lambda
expressions don't depend on closed state, and
so it can move them to top-level and pre-allocate them.

Conceptually we have two kinds of procedures:
(1) Immutable "methods" without object identity.
(While the method is immutable, it may capture
mutable state, of course.)
(2) Mutable procedure objects, with object identity,
and a possibly-mutable set of named properties.

Perhaps the "large" language can support procedure
properties.  In that case procedure eqv? can be
defined in terms of the underlying method *and*
the properties.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports