vtereshkov / umka-lang

Umka: a statically typed embeddable scripting language
BSD 2-Clause "Simplified" License
1k stars 53 forks source link

Proposal: Anonymous struct embedding with method inheritance #387

Open vtereshkov opened 2 months ago

vtereshkov commented 2 months ago

This feature will enable, among other things, having default method implementations, so that a user will no longer need to define a lot of (possibly empty) methods to make his/her struct satisfy an interface.

A Go example: https://go.dev/play/p/ByoUzfqOpn