[e-lang] Bug (0.8.33o): interface{} without a separate guard
leaks itself
Mark Miller
markm at cs.jhu.edu
Sat May 14 23:06:36 EDT 2005
Mark Miller wrote:
> David Hopwood wrote:
>
>> Argument for it being a bug:
>>
>> __conformTo(g) doesn't strictly need the actual guard that is being
>> conformed to; it only needs something that unambiguously identifies that
>> guard (e.g. some object g such that, if you had access to Foo, you could
>> test "Foo <=> g", where Foo must be on the LHS). Therefore the
>> __conformTo
>> protocol does not follow POLA.
>>
>> [Note that I haven't looked at the guard system in very much detail, so I
>> may be missing something or using the wrong terminology.]
>
>
> Your argument is correct. __conformTo just needs to identify the guard,
> not provide it. Providing the guard is indeed a POLA violation. I'm
> probably going to regret this, but...
>
> I'm not inclined to fix this case. I don't think this POLA violation is
> realistically dangerous, and so I don't think it's worth the extra
> difficulty in explaining the improved __conformTo.
The regret may already be starting. This seems like it may be a perfect
example of where "Voluntary Oblivious Compliance", or VOC
http://www.eros-os.org/pipermail/cap-talk/2005-March/003436.html
may be the right parameter passing technique.
(Idea by Alan Karp. Strange name for it by Ping. Code by me. Similar but
different code for VOC by Marc Stiegler appears in Walnut.)
Nevertheless, I think this hammer is too heavy for this non-problem.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list