by mamcx · 12y ago · 0 comments
This interest me because I'm dreaming about build a language and think pattern matching is very cool and look like can replace if & case.
So the question are really 2, to make them more clear:
1- What are the baby steps to make pattern matching?
I could follow a functional language if the explanation is clear, but if the code requiere skills in them I could get lost. So, I ask if exist this kind of resource, if possible. If not, then anything else is ok and them I know I need to devote some time in learn other kind of skills.
2- Is pattern matching more problematic if the language is not functional, inmutable? If is a mix (like with swift), what is the sweet spot (if exist?) or what is needed to make it work easily/better?. So for example, lets imagine that if the language is not statically typed it become harder to implement..