lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheme set list function


From: Aaron Hill
Subject: Re: scheme set list function
Date: Mon, 08 Apr 2019 05:47:34 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-04-08 5:31 am, Andrew Bernard wrote:
Hi All,

Here's a very well written post on pointers in Scheme (it doesn't have
them, full stop). Wonderful language that it is, you can create something
similar for yourself.

We do not have access to pointers in the Scheme language, as it is intended to be abstract from such a lower-level detail. But that doesn't mean there are no pointers behind the scenes. An interpreter/compiler is free to implement the language however it sees fit. If you were writing in C, then you are almost certainly going to be leveraging pointers.

The point here is that some form of indirection must be occurring, since it is possible to pass in a list to a procedure and have that list be modified. Yes, we are not modifying the variable in the caller's scope; but we are modifying what it *refers* to. Hence, why I had considered it pass-by-reference.

Obviously, I am in error with my terminology.


-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]