Open gregsn opened 2 years ago
i like this clean approach very much! only the automatic name pick up doesn't work in all cases.
one question that came up while looking at this was if it come with a performance penalty, when compared to switch-case? And of course we need a possibility to create and edit enums, but that is already on the agenda iirc.
So, from my side this is a proper solution. For release i guess it deserves some syntax sugar like auto-creation of enums or so.
And: not every switch-case deals with enums, that's why i played a bit with the patch and added some more tests: enum switches using delegates and dictionaries.zip
This is a workaround proposal that covers #14.
enum switches using delegates and dictionaries.zip
It surprised me a bit
Cons [Dictionary]
node really isMaybe we just need a complete enum switch automatically created by the VL system. But note: the incomplete switch really looks handy as well, which can't be covered by the system.