[plt-scheme] dots
Hi,
As far as | am concerned, there is no compelling reason. In fact the dot is not really needed. The records can be used as (a 'b) for field reference and (a 'b v) for assignment, where variable a is supposed to contain a record with a field called 'b. If this field contains another record, then descending in that record can be written like ((a ' b) 'c) for reference and ((a 'b) 'c v) for asignment. In fact a.b.c and (set! a.b.c v) are expanded to the forms without dots. You also could write (a (if test 'field-one 'field-two)). Personally I find a.b.c and (set! a.b.c v) a handsome notation. I'm afraid it's a matter of taste, may be bad taste to your taste.
Jos Koot
----- Original Message -----
From: Hans Oesterholt-Dijkema
To: Jos Koot
Cc: PLT-list
Sent: Monday, June 11, 2007 7:35 PM
Subject: Re: [plt-scheme] dots
I don't understand the reason to deviate from the standard
prefix notation in scheme.
Why not use
(. a b)
??
--hans
Jos Koot schreef:
Interested in structs with multiple supertypes and dot-notation? I call them 'records'. Be my guest at:
http://www.telefonica.net/web2/koot/records.zip (40 kb, source code plus documentation (msword))
Kind regards, Jos Koot
----------------------------------------------------------------------------
_________________________________________________
For list-related administrative tasks:
http://list.cs.brown.edu/mailman/listinfo/plt-scheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070612/9c9d6ff5/attachment.html>