Things to improve
Today I started working on adding pattern matching to the SLinks interpreter. I actually only need to add pattern matching to the function operator, the rest can be obtained by syntactic sugar. However, I still have to add quite a lot of code, and in particular, I have to write a W-like algorithm specially for patterns. The unification and other type algorithm however will not need modifications, I believe.
And here is the list of things to improve mentioned in yesterday's post:
- Print types correctly (with parenthesis)
- Correct type system for missing absent field
- Disallow set to list and bag to list operators
- Order of fields in records must be preseved
- Add syntactic sugar for
f(x,y,z)asf(x)(y)(z)and(a,b,c) -> dasa -> b -> c -> d - Change semantic of 'ext' operator to
for x <- s in e - Add '^' in front of all binding variables
- Add syntactic sugar for dot notation
- Add syntactic sugar for tuples as records with labels '#1', '#2' etc.
- Find out why lists are so slow (if it is an algorithmic problem, or a faulty implementation)
- Add support for pattern matching
- Look up the expression problem and try to encode a solution in SLinks