|
|
|
|
|
by h3rald
2027 days ago
|
|
Having created a small concatenative language myself[1], no, the pure concatenative style with no variables and stack combinators is just too much for a normally-wired brain. BUT! I tried to cheat a little bit to make things more readable. Take this example from the min front page, which showcases its concatenative style: . ls-r
(mtime now 3600 - >)
filter
Can you guess what it does? You might, but what about this: . ls-r :files
((mtime > (now - 3600)) ><) =changed-in-last-hour
@files #changed-in-last-hour filter
Now ok, I went insane with sigils and weird operators but:
- creating variables helps
- using infix notation via the infix-dequote (><) operator makes expressions much more readableWhy would I use this rather than a traditional language? It helps reasoning in terms of point-free function composition and in some case it is faster to work with, i.e. processing rules, pipelines, task sequences etc. [1] https://min-lang.org |
|