[e-lang] get/put for Slots

Kevin Reid kpreid at mac.com
Thu Aug 17 10:38:03 CDT 2006


What if the getValue and setValue messages for Slots were renamed to  
'get' and 'put'?

This would match collection access conventions, in that a slot would  
be a zero-dimensional collection.

Also, it would allow access in the style of the 'unary-star' syntax,  
while not being additional syntax.

? var x := 0
# value: 0

? def slot := &x
# value: <var 0>

? slot[]
# value: 0

? slot[] := 1
# value: 1

? x
# value: 1

What do you think?

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list