[haXe] haXe 1.08 and switch on enum
Michael Pliskin
pl at tepkom.ru
Wed Nov 1 11:51:30 CET 2006
Hello Nicolas,
NC> In 1.07, when all constructors were constant (no parameters), haXe was
NC> not checking anymore that all constructors were matched (or default case
NC> was present). 1.08 should be back to 1.06 behavior, which is the one you
NC> show. When you are matching only one value, you can return as well
NC> (s == ps) which is guaranteed to be equal for constant contructors.
Ok, I see your reasoning and it makes sense. However, for non-constant
constructors s == ps won't work, so maybe we should allow variables
instead of constructors sometimes? And matching rules should allow
unmatched constructors if there is at least one variable 'case'
present...
--
Best regards,
Michael mailto:pl at tepkom.ru
More information about the Haxe
mailing list