[Grace-core] NS inheritance cannot work for grace

kjx kjx at ecs.vuw.ac.nz
Wed Nov 29 01:10:09 PST 2017


> A system where methods become inheritable or not based on the values of their arguments seems dubious to me.

:-) 

> (if I can override “random”, evil is no longer reliable). 

so I should've said I was assuming random here was a module.
Although (modulo types & exceptions) it's not clear it matters what
that expression does, so long as it returns a boolean.

>    def x = object {
>        method p { object { } }
>    }
>    method parent(o) { o.p }
>    object { inherit parent(x) }

perhaps. 
arguably, at the top level of a module, this may well meet the definition of inheritable / manifest.
If you can't override x or parent(_), why is this much worse than

object { inherit x.p } 


> It also pushes the “cannot be overridden” criterion deeply through the entire potential call stack

not sure I follow this.

> Otherwise, yes.

Umm OK. 

James




More information about the Grace-core mailing list