At 4:34 PM -0700 10/20/99, Bill Frantz wrote:
>At 04:18 PM 10/20/1999 -0700, Mark S. Miller wrote:
>>At 01:47 PM 10/20/99 , Bill Frantz wrote:
>>>Finally I understand why this is a problem for people. I am so used to the
>>>Algol68 view that all blocks have a value (sometimes NIL), that I just
>>>haven't been seeing where the problem comes from.
>>
>>This doesn't seem right to me. I am at least as used to programming in
>>Smalltalk as in C-like languages, and took many of these habits into E.
>>MarcS likewise. Nevertheless, both of us accidentally created security
>>breaches by letting values be revealed unintentionally. Perhaps Algol68's
>>static typing always made it textually apparent whether a value might
>>escape? Could you give some examples? In particular, how do you write a
>>function whose purpose was merely to cause some side effect, like
>>
>> define setX(newX) { x := newX }
>>
>>so that it was distinct from (what would be, under #3/Ping approach):
>>
>> define setX(newX) => { x := newX }
>
>My Algol68 syntax is quite rusty, but since it is strongly typed, I will
>borrow Java syntax for the moment. (I'll have to blow the dust off some
>books and do it in real Algol68 when I get home.)
>
> void setX(int newX) { x := newX }
>
>[Now to see just how bad my memory is :-)]
The routine itself would be defined as:
(INT newx)VOID: (x := newx)
or the equilivant
(INT newx)VOID: BEGIN x := newx END
The name setx could be declared to be equilivant to the routine by:
PROC setx = (INT newx)VOID: (x := newx)
N.B. Algol68 uses two fonts, one for syntatic elements and one for symbols. I am using the convention that upper case is the syntatic elements and lower case is the symbols.
Bill Frantz | If it doesn't work it's the| Periwinkle -- Consulting (408)356-8506 | user's fault. That's the | 16345 Englewood Ave. frantz@netcom.com | way the web works. | Los Gatos, CA 95032, USA