Since interface{} can hold anything, how can you define equality, or inequality in this case?
nil.x is equal to a non-interface value y if the dynamic type of x is identical to the static type of y and the dynamic value of x is equal to y.nil if it has been assigned the explicit value nil, if it is uninitialized, or if it has been assigned another value equal to nil.(apologies if you get this twice, gmail failed me)
On Sat, 8 Oct 2011 05:06:27 -0700 (PDT), Paulo Pinto <paulo....@gmail.com> wrote:
> This is not really what generics are about.
>
> The funny thing is that Go's percusor, Alef, had support for
> parametrized data types.
>
> http://doc.cat-v.org/plan_9/2nd_edition/papers/alef/ref (chapter 4.8)
interesting (especially the bound and unbound forms to instantiate such
templates)
as Go borrows so much (?) from Alef, anybody to chime in as to why
getting these parametric types might not be a good idea for Go as well ?
or how did they render Alef fragile/cumbersome/whatever ?
-s
Alef's polymorphic types were an idea that never reached fruition. I don't even remember a first draft implementation being finished. They certainly never appeared in any production code I know of.
By the way, I wouldn't say Go borrows "so much" from Alef. They share an ancestor but not a direct lineage.
-rob
ah. too bad, having some experience via Alef would certainly have been
a valuable data point...
-s