public inbox for
 help / color / mirror / Atom feed
From: Keisuke Nishida <>
Subject: pass by value / pass by reference
Date: Wed, 15 Mar 2000 16:27:00 -0000	[thread overview]
Message-ID: <> (raw)


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...

             reply	other threads:[~2000-03-15 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-15 16:27 Keisuke Nishida [this message]
2000-03-15 16:37 ` Keisuke Nishida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).