> On Mar 26, 2016, at 12:22 PM, Ryan Culpepper <[email protected]> wrote:
> 
>> My mind considers the m position in (send o m a …) a referentially
>> opaque position. Hence define-local-member-name, which substitutes
>> names through a scope, should not replace this m — even if m is
>> in its list of names. Similarly, in (printf “(send o m 1)”) 
>> define-local-member-name
>> should not peek inside the quotes. [This example is directly derived from
>> Quine’s treatise on language and everyone tends to agree. Other
>> positions in a language are subject to conversations among designers.]
> 
> You should think of (send o [] a ...) as a referentially transparent context 
> (but a member-key context, not an expression context). The only bug here is 
> the printing of the variable name 'm' in the error rather than what it refers 
> to. (That's what Robby's suggestion would fix.)


I agree with you here. I was wrong in calling this position referentially 
opaque. It is opaque from the perspective of local scope, but transparent with 
respect to the scope of ‘o’. Call it referentially translucent.  It’s the 
difference between lexical scope and static scope. 



> [...]
>> In languages that do not treat ‘send’ as a macro and in statically typed
>> languages (even unsoundly typed ones such as C++), I think it’s perfectly
>> okay if a ‘friend’ method m in C refers to a public method ‘m’ in class D.
>> That’s what I had imagined and that’s why I sent the message (though
>> I am hoping for an error message).
> 
> "friend" is a concept that belongs to an access-control-based object system, 
> but Racket's object system is capability-based.
> 
> In particular, you could think of a hypothetical `(friend m)` form as 
> attaching some new access-control information to `m` (in the scope of the 
> friend declaration), but leaving the identity of `m` as a member key alone. 
> In contrast, `(define-local-member-name m)` substitutes member-key references 
> to `m` with a fresh unrelated key.


The ‘friend’ words are mostly an analogy, not a true concept relevant to this 
discussion. Note though that the word has been used on this mailing list and 
‘user’ in this context. 

— Matthias


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/67335E3C-FAE7-4EE0-9341-D8AEA9C6831B%40ccs.neu.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to