Hi folks,
I just used Structural Pattern Matching quite intensively and I'm
pretty amazed of the new possibilities.
But see this code, trying to implement Mark Pilgrim's regex
algorithm for roman literals with SPM:
With constants, I can write
match seq:
case "M", "M", "M", "M", *r:
return 4 * 1000, r
But if I want to use abbreviations by assignment, this is no longer
possible, and I have to write something weird like:
M = "M"
match seq:
case a, b, c, d, *r if M == a == b == c == d:
return 4 * 1000, r
So what is missing seems to be a notion of const-ness, which
could be dynamically deduced. Am I missing something?
This list is not for help or ideas, also its basically dead.