[bitc-dev] (member ...) syntax
Pal-Kristian Engstad
pal_engstad at naughtydog.com
Tue Sep 30 16:41:25 CDT 2008
I think the (member ...) construction is poorly named. Instead of using
"(member if id)" as a syntax for "if.id", perhaps "member" should be
replaced with a single dot ".", i.e.:
(. sloc id) <=> sloc.id
(. sloc id1 id2 id3) <=> sloc.id1.id2.id3
Additionally, it might be an idea to support integer values as well. Hence:
(. aloc 3) <=> (array-nth aloc3) { Is there a reason not to have
aloc[3]? }
(. vec 2) <=> vec[2] <=> (vector-nth vec 3)
If using a single dot is not lexable, then perhaps use "->" instead.
Also, using #| and |# as (nested) comment blocks could be useful.
PKE.
--
Pål-Kristian Engstad (engstad at naughtydog.com),
Lead Graphics & Engine Programmer,
Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,
Santa Monica, CA 90404, USA. Ph.: (310) 633-9112.
"It is better to have 100 functions operate on one data structure
than 10 functions on 10 data structures." -- NN
More information about the bitc-dev
mailing list