[Top][All Lists]

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

[Visionaries] WebScheme Update

From: Peter Minten
Subject: [Visionaries] WebScheme Update
Date: Thu, 12 Jun 2003 08:49:26 +0200
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4) Gecko/20030529

Hi folks,

I tackled some of the problems in the WebScheme design during the last days and now have a brand new working model (that is, until I find a case that breaks it :-).

The major change is the introduction of pass-by-value. From now on (define),(set!) and (let) use pass-by-value. Everything else is pass-by-reference. There are (define-ref) and (set-ref!) methods to allow pass-by-reference for (define) and (set!) too. In (let) you can make a clause pass-by-reference by putting 'ref' in as the first word like this (let ((ref a b)) ...). I added this feature because in most cases pass-by-reference is wanted in assignments.

A second 'feature' is the dumping of attributes. The attribute stuff was just a way to say (define foo bar) so it's better to do that clearly. That's why I changed the definition of (define) to: (define target value . forms) where forms are executed after the assigment, in order and in the scope of the define. I also added a special variable called define-target (for now) that is always reference to the target and available from every function. So now attributes are normal functions that change define-target.

Finally with the attributes going away I got the square braces back, but not for long :-). The C type array notation now works in WebScheme for arrays, but it also works for hashes and all that jazz. The syntax expansion is: a[b] -> (a.index b).



reply via email to

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