Static method inheritance is one thing. Member method inheritance (or lack there of) makes it long in the tooth to work with if you want to represent covariant classes that share methods.
Wren does have instance method inheritance. It's implemented differently from most scripting languages, though. The implementation is more like a statically-typed language, for performance reasons:
Trying to update a field from a subclass and print the results doesn’t work.
class A {
name {
_name
}
name=(value){
_name=value
}
construct new () {
_name = "hello"
}
thing() {
System.print(name)
}
}
class B is A {
construct new () {}
update(name){
super.name = name
return this
}
}
var b = B.new()
b.update("world").thing()
If you change System.print(name) to System.print(_name) it works but it doesn’t when using the getter. You get null when System.print(name) is called.