haxetink / tink_core

Core utilities
https://haxetink.github.io/tink_core
MIT License
117 stars 33 forks source link

Error code addition #81

Open FrancisBourre opened 6 years ago

FrancisBourre commented 6 years ago

Error code additions. Not convinced by this PR, I mean, wouldn't be better to refactor TypedError constructor to accept an Abstract instead of a closed enum, and make multiple enums possible relying on this abstract? It would allow anyone to extend the list from outside and keep pattern matching possible.

FrancisBourre commented 6 years ago

I was thinking about something like this (should be retro-compatible): https://try.haxe.org/#e064d