public inbox for
 help / color / mirror / Atom feed
* pass by value / pass by reference
@ 2000-03-15 16:27 Keisuke Nishida
  2000-03-15 16:37 ` Keisuke Nishida
  0 siblings, 1 reply; 2+ messages in thread
From: Keisuke Nishida @ 2000-03-15 16:27 UTC (permalink / raw)
  To: guile-emacs


One problem of my current implementation is that whenever one
interpreter calls the other one, the arguments are converted
into the other type; that is, they are passed by value.  This
works fine for some cases, but sometimes it is necessary to pass
them by reference.

Using some tricks, our Scheme files may look like this:

  ;; Import a variable from the lisp world.
  (import-lisp-variable user-full-name)

  ;; Get the value of variable by value.
  (define name (user-full-name))

  ;; Set the value of varialbe
  (set! (user-full-name) name)

  ;; Call a Lisp function with the reference of variable
  (insert user-full-name)

This looks nice and natural, but I wonder if this code can be used
in the future with the real Guile-based Emacs, where all values are

But I guess this is an unavoidable drawback of my approach.
I have to do this in any event.  I understand I'm doing a bad thing...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-03-15 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-15 16:27 pass by value / pass by reference Keisuke Nishida
2000-03-15 16:37 ` Keisuke Nishida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).