uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
61 stars 16 forks source link

Change mixins syntax to follow the linearization direction #536

Open javierfernandes opened 8 years ago

javierfernandes commented 8 years ago

Currently mixins are declared like in scala

class C inherits B mixed with M1, M2, M3

This produces the following inheritance chain by linearization

C -> M3 -> M2 -> M1 -> B

Which is not complex if you already know the way mixins are combined but makes me wonder why don't we try a syntax that visually resembles to the final chain ?

class C mixed with M3, M2, M1 inherits B
flbulgarelli commented 8 years ago

The altered order seems really weird to me, but that is perhaps because I get used to that syntax.

So I really don't have any strong position here, but my guess is that you may be right.

We should do A/B testing here :smile:

fdodino commented 4 years ago

Hoy dando clase me resultó extraño y también es confuso para el alumno tener este formato, 100% de acuerdo con la idea de Javi de modificar la forma de definir el mixin para que siga la linearización.