[e-lang] get/put for Slots

Dean Tribble tribble at e-dean.com
Wed Aug 30 00:24:11 CDT 2006


I'm not sure that it is useful to tempt people into cleverly oveloading
slots with lists, etc. :-)  Do you have a pattern of usage in mind?  My
preference would be to have a protocol that highlighted when a slot was
being accessed via methods since that's a likely source of inobvious
aliasing.

On 8/17/06, Kevin Reid <kpreid at mac.com> wrote:
>
> 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eros-os.org/pipermail/e-lang/attachments/20060829/47e59477/attachment.html 


More information about the e-lang mailing list