Yeah, like @innov8ian pointed out, the class-based solution seems quite rigid and can lose information… I’m thinking it’d be nice (maintenance-friendly) to just support this parameter reuse/tweaking directly, perhaps something like this:
// primary constructors:
class BinaryField(**args of super except [ editable ]) : Field(**args, editable = false)
// functions in general (if several, generate all of them?):
override fun someFunc(**args of override) {
println("Override!")
super(**args)
}
// as help for composition:
fun bubu(**args of bubuImpl::bubu) {
bubuImpl.bubu(**args)
}
// or even
fun baba(**args of member::func, **moreArgs of otherMember::otherFunc) {
member.func(**args)
otherMember.otherFunc(**moreArgs)
}